arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2609.00579v1 [cs.PL] 01 Sep 2026

Predicting Program Exit Code with LLMs and Programming Language Semantics

DOI: 10.1145/3843750.3843842ISBN: 979-8-4007-2986-7/2026/10Conference: Proceedings of the 2nd ACM SIGPLAN International Workshop on Language Models and Programming Languages; October 4–9, 2026; Oakland, CA, USAProceedings of the 2nd ACM SIGPLAN International Workshop on Language Models and Programming Languages (LMPL ’26), October 4–9, 2026, Oakland, CA, USAsplashws26lmplmain-p42-pCCS: General and reference Empirical studiesCCS: Theory of computation Operational semanticsCCS: Computing methodologies Machine learning
Lara Marinov Affiliation: The University of Texas at Austin, Austin, USA email: marinov@utexas.edu , Aditya Thimmaiah Affiliation: The University of Texas at Austin, Austin, USA email: auditt@utexas.edu , Jayanth Srinivasa Affiliation: Cisco Research, San Francisco, USA email: jasriniv@cisco.com , Junyi Jessy Li Affiliation: The University of Texas at Austin, Austin, USA email: jessy@utexas.edu and Milos Gligoric Affiliation: The University of Texas at Austin, Austin, USA email: gligoric@utexas.edu
Received  2026-08-14
Abstract.

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.

Keywords: 
Operational Semantics, K Framework, Program Executability Prediction, Large Language Models
††cc-license: by

1. Introduction

LLMs have become widely used in software engineering, demonstrating remarkable proficiency in tasks like code generation (Nijkamp et al., 2023; Guo et al., 2023; Lu et al., 2022), code translation (Yang et al., 2024a; Macedo et al., 2025), bug fixing (Hossain et al., 2024; Liu et al., 2024), and summarizing complex codebases (Makharev and Ivanov, 2025; Sun et al., 2025; Lomshakov et al., 2024). However, despite their practical success, it remains unclear to what extent these models truly comprehend the underlying semantics of the programs they process.

Much of an LLM’s apparent coding ability seems to come from sophisticated pattern matching and the memorization of vast amounts of training data, rather than an inherent ability to logically simulate program execution (Yang et al., 2024b; Meeus et al., 2026). For example, consider a scenario where an LLM is presented with a standard sorting algorithm. Because the model has previously encountered this exact structure many times, it can easily summarize its purpose, generate missing lines of code, or predict the final outcome (Štorek et al., 2026; Euraste et al., 2026). However, if we introduce a subtle change to the program, such as slightly modifying the loop bounds, obfuscating variable names, or redefining how the comparison operator works, and ask the model to predict the result, it frequently fails (Wang et al., 2024). Instead of systematically tracing the data flow step-by-step as an interpreter would, the model often falls back on its priors and simply guesses the standard sorted output (Malfa et al., 2024; Bernstein et al., 2026). Such a situation clearly reveals a gap between rote memorization and genuine, systematic semantic reasoning.

Recent work introduced PLSemanticsBench (Thimmaiah et al., 2026) and established a framework for evaluating LLMs’ semantic understanding through three tasks: predicting final variable states (PredState), identifying the formal semantic rules applied during execution (PredRule), and generating step-by-step execution traces (PredTrace) (Thimmaiah et al., 2026). Evaluations revealed that current LLMs struggle significantly across all three of these tasks. Because PLSemanticsBench presented a set of complex evaluations where models needed to articulate intermediate steps and output long execution traces, the models’ uniformly low performance leaves an open question regarding exactly where their capability threshold is. To determine whether these failures are in-part due to the natural multi-step complexity of the tasks presented in PLSemanticsBench or a fundamental inability to reason about semantics, we establish a more foundational baseline that separates trace generation from semantic judgment. Building on this premise, we present PrEx: a task that asks models, given a program and formal programming language semantics, to predict whether execution succeeds or halts with a semantic error—and, when it fails, which rule was violated. The required output is deliberately small with just a discrete executability verdict rather than a long trace but the evaluation is not: we pair each valid program with invalid counterparts produced by semantics-aware invalid transformations, vary program source and structural complexity across three splits, and probe rule-following under alternate semantic formalisms and shifts. This design lets us ask whether models systematically apply the supplied rules or instead continue to rely on memorized priors.

Dataset. We build on the valid C∗ programs from PLSemanticsBench and extend them with semantically invalid transformations required by PrEx. Invalid programs are generated from valid programs using a semantics-aware transformation procedure that applies one of five errors: break-outside-loop, continue-outside-loop, divide-by-zero, modulo-by-zero, and variable-use-before-declare. Each valid program has a matched invalid counterpart in every error category. Programs come from three splits—Human-Written, LLM-Translated, and Fuzzer-Generated—with average length and complexity increasing across splits. Together, these design choices let us test whether semantic reasoning generalizes across program sources and complexity levels, not just memorized coding patterns.

Semantic formalisms. We evaluate models under two semantic formalisms: small-step operational semantics (𝕊\mathbb{S}) and the K-framework (𝕂\mathbb{K}). 𝕊\mathbb{S} defines execution through finer granularity inference rules, where each rule represents one atomic computation step (Plotkin, 2004). 𝕂\mathbb{K} instead uses coarser rewriting rules that transform program configurations in larger chunks, relying on built-in rewriting to handle intermediate expression reduction (Roșu and Șerbănută, 2010). We include both to test whether an LLM’s ability to apply provided semantics depends on rule granularity or persists across formalisms.

Semantic shifts. We also evaluate models under two semantic shifts, KeywordSwap and KeywordObf, that alter the meaning of selected symbols while keeping execution defined by the provided formal rules. KeywordSwap interchanges the meanings of familiar operator symbols (e.g., + denotes subtraction), requiring models to override pre-trained associations and follow the supplied semantics. KeywordObf replaces standard operators and keywords with novel single-token symbols, removing recognizable cues from pre-training while preserving the same underlying rules. Together, these conditions test whether LLMs can reason from explicitly provided semantics rather than from their prior knowledge.

We evaluate open-source LLMs designed for coding tasks and enhanced reasoning using both non-chain-of-thought and chain-of-thought (CoT) reasoning. Our findings indicate that even on the simpler task (PrEx) of predicting program exit codes, LLMs continue to lean on priors learned during pre-training rather than systematically applying the supplied formal rules. Performance is especially poor under KeywordSwap and KeywordObf, where models must override familiar symbol meanings to follow the provided semantics. Accuracy also degrades significantly on the LLM-Translated and Fuzzer-Generated splits compared to Human-Written, indicating that semantic reasoning does not generalize well as structural complexity increases.

2. Task Description

1 int i; 2 int ans; 3 int n; 4 i = 1; 5 n = 10; 6 while ((i * i) <= n) { 7    i = (i + 1); 8    ans = (ans + 1); 9 };
(a) Valid program
1 int i; 2 int ans; 3 int n; 4 i = 1; 5 n = 10; 6 while ((i * i) <= n) { 7    n = 0; 8    i = ((i / n) + 1); 9    ans = (ans + 1); 10 };
(b) Invalid program
Figure 1. Valid and invalid PrEx task examples.

In traditional program interpretation, the semantic analyzer identifies semantic errors in the input program, typically following parsing (Aho et al., 2006; Appel, 1997). As a step towards our long term goal–evaluating whether LLMs can function as interpreters–in this paper, we tasked LLMs with detecting semantic errors.

We not only provide the model with a program it is expected to analyze but also supply the formal semantics of the language, including the inference rules that govern valid and invalid executions, thereby encouraging it to reason about semantic correctness. If an LLM identifies a program as semantically invalid, it is further instructed to specify the rule that formalizes the error, assessing its understanding of the programming language semantics. Consequently, we test not only if these models can identify a program as semantically invalid, but also if they lean on priors learned in their training data or on the semantics provided to them.

To illustrate the task, consider the example in Figure 1 of a C∗ program which calculates the integer square root of the variable nn. The program in Figure 1(a) is semantically valid and contains no rule violations, so an LLM successfully performing PrEx should classify it as valid, based on semantic reasoning over the inference rules rather than needing to simulate a full step-by-step execution. In contrast, Figure 1(b) shows an invalid variant of the same base program. Because line 8 of the invalid program contains a division-by-zero error, an LLM should successfully classify the program as invalid and accurately specify the violated rule.

3. Methodology

This section describes our experimental setup for PrEx. We describe the C∗ programming language (Section 3.1), the semantic formalisms used to specify program behavior (𝕊\mathbb{S} and 𝕂\mathbb{K}; Section 3.2), semantic shifts that test whether models follow provided rules or pre-training priors (KeywordSwap and KeywordObf; Section 3.3), and the full prompt given to models (Section 3.4). The C∗ language, semantic formalisms, and semantics shifts are introduced in PLSemanticsBench (Thimmaiah et al., 2026), but we recap them here together with the full prompt used for PrEx.

3.1. C∗ Language

We evaluate models on programs written in C∗, a small imperative language with C-like syntax. The complete EBNF grammar used in our experiments is given in Figure 2. We use the same C∗ language as PLSemanticsBench.

Figure 2. Complete syntax of C∗ in EBNF (<letter> and <digit> rules are omitted and have their usual definitions).
1 <program> ::= <stmt_list>
2 <stmt_list> ::= (<stmt> ';')*
3 <stmt> ::= 'int' <id>
4 | <id> '=' <aexp>
5 | 'if' '(' <bexp> ')' '{' <stmt_list> '}' 'else' '{' <stmt_list> '}'
6 | 'while' '(' <bexp> ')' '{' <stmt_list> '}'
7 | 'loop' '(' <bexp> ')' '{' <stmt_list> '}'
8 | 'halt'
9 | 'continue'
10 | 'break'
11 | 'LE'
12 <aexp> ::= <id>
13 | <literal>
14 | '(' <aexp>? <mathop> <aexp> ')'
15 <bexp> ::= '(' <bool> ')'
16 | '(' <aexp> <relop> <aexp> ')'
17 | '(' <lognot> <bexp> ')'
18 | '(' <bexp> <logicalop> <bexp> ')'
19 <bool> ::= 'true' | 'false'
20 <mathop> ::= '+' | '-' | '*' | '/' | '%'
21 <relop> ::= '<' | '<=' | '>' | '>=' | '==' | '!='
22 <lognot> ::= '!'
23 <logicalop> ::= '&&' | '||'
24 <id> ::= <letter> (<letter> | <digit>)*
25 <literal> ::= <digit>+

3.2. Semantic Formalisms

We evaluate the models using two distinct semantic formalisms: Small-step operational semantics (𝕊\mathbb{S}) and the K-framework (𝕂\mathbb{K}). We use both formalisms to understand how the granularity and style of formal rules affect an LLM’s ability to correctly reason about the programs it is given and to discover if presenting the semantic rules in a particular formulization maximizes the model’s adherence to them.

Small-step operational semantics (𝕊\mathbb{S}). 𝕊\mathbb{S} is a fine-grained semantic formalism, where each rule represents one atomic computation (Plotkin, 2004). Execution happens through repeated rule applications as expressions are broken down into tiny constituent parts and resolved one by one. Rules are written in Gentzen-style inference notation (Gentzen, 1964), with premises and side conditions written above the bar and conclusions below.

Table 1 shows a subset (due to the space reasons) of the 𝕊\mathbb{S} rules used in our experiments. To illustrate how the 𝕊\mathbb{S} formalism handles both valid execution and error states, we highlight several key rules. Rules 1 and 2 form a complementary pair describing variable lookup: Rule 1 defines successful evaluation when a variable is bound in the current state, while Rule 2 states that attempting to evaluate an undeclared variable results in an error. Similarly, Rules 18 and 19 describe the division operation, distinguishing between valid integer division and a division-by-zero error. Rule 9 highlights the fine-grained, small-step nature of the formalism by explicitly defining the addition transition only after both operands have been fully reduced to values.

K-framework. The K-framework is a coarser, rewriting-based framework (Roșu and Șerbănută, 2010; Verification, 2025). K-framework semantics evaluate code in slightly larger, higher-level chunks rather than atomic steps. Table 2 shows a subset of the K-framework rules used in our experiments, paralleling the 𝕊\mathbb{S} rules.

Like the 𝕊\mathbb{S} formalism, Rules 1 and 2 from 𝕂\mathbb{K} form a pair describing variable lookup. Rule 1 defines successful evaluation when a variable maps to a value in the current program state, and Rule 2 states that attempting to evaluate an undeclared variable stops execution. Likewise, Rules 6 and 7 (Table 2) parallel 𝕊\mathbb{S} Rules 18 and 19 (Table 1) to handle division. Rule 6 defines valid integer division when the right operand is not zero, and Rule 7 defines the error for division by zero.

Table 1. Some 𝕊\mathbb{S}-semantics rules of the C∗ language.
Rule Formalization Description
Rule 1 σ⁡(x)=v⟨x,σ,χ⟩→v\frac{\sigma(\texttt{x})=\texttt{v}}{\langle\texttt{x},\sigma,\chi\rangle\to\texttt{v}} If a variable is associated with a value in the current program state, then evaluating it yields that value.
Rule 2 σ(x)=⊥⟨x,σ,χ⟩→⟨ERROR,σ,χ⟩\frac{\sigma(\texttt{x})=\bot}{\langle\texttt{x},\sigma,\chi\rangle\to\langle\texttt{ERROR},\sigma,\chi\rangle} If a variable has no associated value in the current program state, then attempting to evaluate it results in an error and the program execution stops immediately.
Rule 9 v3=v1 + v2⟨v1 + v2,σ,χ⟩→v3\frac{\texttt{v3}=\texttt{v1 + v2}}{\langle\texttt{v1 + v2},\sigma,\chi\rangle\to\texttt{v3}} When both operands of a ‘+‘ expression are values, the result is obtained by adding those two values.
Rule 18 v2≠0​v3=v1 / v2⟨v1 / v2,σ,χ⟩→v3\frac{\texttt{v2}\neq\texttt{0}\hskip 8.19447pt\texttt{v3}=\texttt{v1 / v2}}{\langle\texttt{v1 / v2},\sigma,\chi\rangle\to\texttt{v3}} When both operands of a ‘/‘ expression are values and the right operand value is not zero, the result is obtained by integer division of the left operand value by the right operand value.
Rule 19 v2=0⟨v1 / v2,σ,χ⟩→⟨ERROR,σ,χ⟩\frac{\texttt{v2}=\texttt{0}}{\langle\texttt{v1 / v2},\sigma,\chi\rangle\to\langle\texttt{ERROR},\sigma,\chi\rangle} When both operands of a ‘/‘ expression are values and the right operand value is zero, then an error occurs and the program execution stops immediately.
int a;
int b;
a = 3 / b;
Program …
<stmt> ::= ‘int’ <id>
| <id> ‘=’ <aexp>
| ‘if’ ‘(’ <bexp> ‘)’ …
C∗ syntax in EBNF …
Rule 19:
 v2 = 0
 ---------
 <v1/v2,…> →\to ERROR …
𝕊\mathbb{S} …
rule [7]:
 <k> I1 / I2 ⇒\Rightarrow ERROR
 requires I2 = 0 …
𝕂\mathbb{K}orPrompt inputor ##success## ##error##
+ violated rule
Model output
Figure 3. Overview of the PrEx prompt: the model receives the C∗ grammar, semantic rules (𝕊\mathbb{S} or 𝕂\mathbb{K}), and a program, and must predict executability.

The primary difference between the two formalisms is how they handle intermediate computations, which is best illustrated by the addition operation. In the 𝕊\mathbb{S} formalism, Rule 9 dictates the addition of two values, but its strictly small-step nature means this rule only applies after separate, explicitly defined atomic steps have reduced the operands into discrete values first. In contrast, the 𝕂\mathbb{K} semantics uses its built-in rewriting to handle this operand reduction implicitly. So, the corresponding Rule 3 for 𝕂\mathbb{K} encapsulates the addition evaluation into a single, coarser rewrite step, evaluating the expression once both operands are values.

3.3. Semantic Shifts

We use two semantic shifts, KeywordSwap and KeywordObf, to test whether models can trace programs using explicitly provided rules rather than relying on their prior knowledge.

KeywordSwap. KeywordSwap reassigns the semantic meanings of selected operator symbols to their counterparts (Table ). For example, addition (+) and subtraction (-) are interchanged, such that the + symbol dictates subtraction. To reason correctly, models must strictly condition on the provided rules and override pre-trained semantic associations.

Table 2. Some 𝕂\mathbb{K}-semantics rules of the C∗ language.
Rule Formalization Description
Rule 1 <k> X:Id ⇒\Rightarrow I …\ldots </k>
  <state> …\ldots X ↦\mapsto I …\ldots </state>
  <rules> L ⇒\Rightarrow L ListItem(“Rule 1”) </rules>
If a variable is associated with a value in the current program state, then evaluating it yields that value.
Rule 2 <k> X:Id ⇒\Rightarrow {ERROR} </k>
  <state> Rho:Map </state>
  <rules> L ⇒\Rightarrow L ListItem(“Rule 2”) </rules>
  requires notBool (X in_keys(Rho))
If a variable has no associated value in the current program state, then attempting to evaluate it results in an error and the program execution stops immediately.
Rule 3 <k> I1 {PLUS_OP} I2 ⇒\Rightarrow I1 +Int+\ \mathrm{Int} I2 …\ldots </k>
  <rules> L ⇒\Rightarrow L ListItem(“Rule 3”) </rules>
When both operands of a ‘+‘ expression are values, the result is obtained by adding those two values.
Rule 6 <k> I1 {DIV_OP} I2 ⇒\Rightarrow I1 /Int/\ \mathrm{Int} I2 …\ldots </k>
  <rules> L ⇒\Rightarrow L ListItem(“Rule 6”) </rules>
  requires I2 ≠Int\neq\mathrm{Int} 0
When both operands of a ‘/‘ expression are values and the right operand value is not zero, the result is obtained by integer division of the left operand value by the right operand value.
Rule 7 <k> I1 {DIV_OP} I2 ⇒\Rightarrow {ERROR} …\ldots </k>
  <rules> L ⇒\Rightarrow L ListItem(“Rule 7”) </rules>
  requires I2 =Int=\mathrm{Int} 0
When both operands of a ‘/‘ expression are values and the right operand value is zero, then an error occurs and the program execution stops immediately.

KeywordObf. KeywordObf replaces standard operator and keyword symbols with novel single-token symbols (Table ). For instance, an expression using the ⋆\star symbol is executed as addition. The KeywordObf condition ensures models can apply explicitly defined rules in the absence of recognizable patterns from prior exposure. Unlike PLSemanticsBench whose symbols are tokenized into multiple tokens by LLMs, we use a different set of symbols that are each one token. Ensuring each novel symbol maps to a single token prevents artificial inflation of the prompt length, reduces overall token overhead, and minimizes the risk of introducing unintended syntactic complexities that might confuse the model.

3.4. Full Prompt

For each program, we provide the model with the C∗ syntax in EBNF, the semantic rules (𝕊\mathbb{S} or 𝕂\mathbb{K}), and the program itself. Figure 3 summarizes this prompt structure. The model must predict whether the program is executable (##success##) or semantically invalid (##error##), and when invalid, identify the violated rule. For non-reasoning models, we evaluate both direct-answer and CoT using only variants with minor changes to this prompt (CoT is told to provide the reasoning).

4. Dataset Construction

The set of programs used in our evaluation are comprised of three splits: Human-Written, LLM-Translated, and Fuzzer-Generated. We use the same valid programs as PLSemanticsBench and extend their dataset with invalid programs, because PrEx requires both valid and invalid programs. We obtain these invalid programs by applying semantics-aware transformations to valid programs, so that each invalid counterpart is derived directly from a matched valid one with consistent style and complexity.

Human-Written. The Human-Written split of C∗ programs are manually adapted from C++ programs sourced from LeetCode, HumanEval, CodeContests, and MBPP (LeetCode, 2024; Chen et al., 2021; Zheng et al., 2023; Li et al., 2022; Austin et al., 2021). For each program, a single public test case and its corresponding oracle is selected.

LLM-Translated. The LLM-Translated split of C∗ programs are C++ programs translated to C∗ by LLMs. The C++ programs are sourced from CodeForces solutions published to HuggingFace (Penedo et al., 2025). Qwen2.5-Coder 32B is prompted with the C∗ syntax, semantics, the C++ solution, and one public test case to generate a valid C∗ program, and answers are filtered for successful test execution using the K-framework.

Fuzzer-Generated. The Fuzzer-Generated split of C∗ programs are constructed with a depth-controlled, semantics-aware, grammar-based fuzzer (Yang et al., 2011; Han et al., 2019). The fuzzer picks statements from assign, if-else, while, break, continue, halt using depth-tapered probabilites to reduce the chance of generating new nested if/while blocks.

Table 4. Program size in lines of code (LOC) and token counts measured by the GPT-4o tokenizer per dataset split.
LOC Tokens
Split # programs Min Median Max Min Median Max
Human-Written 162 4 19 80 18 81 351
LLM-Translated 165 8 106 597 33 538 2,092
Fuzzer-Generated 164 85 786 1,961 982 9,081 22,239

Table 4 shows program length across the three splits. Median lines of code (LOC) increases from Human-Written to LLM-Translated to Fuzzer-Generated. Even the shortest Fuzzer-Generated program is longer than the longest Human-Written program. We start with 491 valid programs88 8 The original PLSemanticsBench set had 492 valid programs, but we removed one Fuzzer-Generated program because its full PrEx prompt (C∗ syntax, semantic rules, and program) requires ∼\sim37K tokens and exceeds the 32K context window of our Qwen2.5-Coder models, leaving 491 semantically valid programs.. These programs are transformed to create 2455 semantically invalid programs. The transformation process uses an ANTLR-based parser-visitor to apply the five predefined transformations to each valid program, corresponding to the five semantic error rules under 𝕊\mathbb{S} and 𝕂\mathbb{K} formalizations. These transformations introduce specific semantic errors: 1) inserting a break outside a loop, 2) inserting a continue outside a loop, 3) division by zero, 4) modulo by zero, and 5) using an undeclared variable. Each invalid program is generated by applying one random transformation rule to a valid C∗ program, ensuring each violates exactly one semantic error rule. For each valid program, we generate one corresponding semantically invalid program in each of the five error categories. Figure 4 illustrates these transformations on a shared valid program.

Table 5. Introduced semantic errors and corresponding rules.
Executability Semantic error type Corresponding Rule Count Percentage
𝕂\mathbb{K} 𝕊\mathbb{S}
success — — — 491 16.7%
error Break outside loop 34 73 491 16.7%
error Continue outside loop 31 76 491 16.7%
error Divide by zero 7 19 491 16.7%
error Modulo by zero 9 23 491 16.7%
error Variable use before declare 2 2 491 16.7%
Valid program ⬇ int a; int b; int ans; a = 3045; b = 1078; ans = (a + b); Break outside loop ⬇ int a; int b; int ans; a = 3045; b = 1078; +break; ans = (a + b); Continue outside loop ⬇ int a; int b; int ans; +continue; a = 3045; b = 1078; ans = (a + b); Divide by zero ⬇ int a; int b; int ans; -a = 3045; +a = (3045 / 0); b = 1078; ans = (a + b); Modulo by zero ⬇ int a; int b; int ans; +ans = 0; -a = 3045; +a = (3045 % ans); b = 1078; ans = (a + b); Var use before declare ⬇ int a; int b; int ans; a = 3045; b = 1078; -ans = (a + b); +ans = (y + b);
Figure 4. Example of a valid program and semantically invalid programs with their corresponding error categories.

Table 5 shows the type of semantic errors introduced, their corresponding rules under 𝕊\mathbb{S} and 𝕂\mathbb{K} formalizations, and the number of programs in the dataset that violate each rule. The percentages are computed over the full set of 2946 programs.

5. Experiments and Results

We benchmark models under three settings by providing: the standard semantics and the unmodified program, KeywordSwap semantics and the transformed program, and KeywordObf semantics and the transformed program. Ground truths labels are derived from the transformation procedure. Valid programs are labeled ##success##, and each semantically invalid variant is labeled ##error## with the corresponding violated rule. We evaluate open-source LLMs designed for coding tasks and enhanced reasoning ability on PrEx, including models in the Qwen (Hui et al., 2024), DeepSeek (Guo et al., 2025), and Ministral (Liu et al., 2026) families. For non-reasoning models, we experiment with both CoT and non-CoT prompting. We run each model three times per configuration and report the mean accuracy across runs. Configurations are

{𝕊,𝕂}\displaystyle\{\mathbb{S},\mathbb{K}\} ×{S​t​a​n​d​a​r​d,K​e​y​w​o​r​d​S​w​a​p,K​e​y​w​o​r​d​O​b​f}\displaystyle\times\{Standard,KeywordSwap,KeywordObf\}
×{non-​C​o​T,C​o​T}.\displaystyle\times\{\text{non-}CoT,CoT\}.

Because reasoning models generate chain-of-thought traces by default, we evaluate them under one prompting condition only and do not run separate CoT and non-CoT variants.

Table 6. PrEx accuracy on Human-Written programs.
Models 𝕂\mathbb{K}-semantics 𝕊\mathbb{S}-semantics
Standard KeywordSwap KeywordObf Standard KeywordSwap KeywordObf
(pp) (pp) (pp) (pp)
Random 18 18 (000) 16 (-02) 18 18 (000) 16 (-02)
Ministral 3 3B 61 47 (-14) 14 (-47) 46 41 (-05) 21 (-25)
Ministral 3 8B 77 66 (-11) 24 (-53) 69 55 (-14) 20 (-49)
Ministral 3 14B 90 75 (-15) 32 (-58) 87 78 (-09) 45 (-42)
Qwen2.5-Coder 3B 44 23 (-21) 7 (-37) 23 28 (+05) 18 (-05)
Qwen2.5-Coder 7B 45 22 (-23) 6 (-39) 55 35 (-20) 21 (-34)
Qwen2.5-Coder 14B 64 41 (-23) 26 (-38) 83 74 (-09) 37 (-46)
Qwen2.5-Coder 32B 70 57 (-13) 39 (-31) 92 71 (-21) 45 (-47)
DeepSeek-Qwen 14B 91 69 (-22) 81 (-10) 92 71 (-21) 61 (-31)
DeepSeek-Qwen 32B 99 77 (-22) 98 (-01) 98 71 (-27) 88 (-10)
Ministral 3 3B-CoT 94 76 (-18) 54 (-40) 89 75 (-14) 64 (-25)
Ministral 3 8B-CoT 99 79 (-20) 77 (-22) 97 78 (-19) 64 (-33)
Ministral 3 14B-CoT 99 79 (-20) 91 (-08) 99 78 (-21) 89 (-10)
Qwen2.5-Coder 3B-CoT 32 25 (-07) 16 (-16) 33 27 (-06) 17 (-16)
Qwen2.5-Coder 7B-CoT 69 49 (-20) 32 (-37) 71 46 (-25) 26 (-45)
Qwen2.5-Coder 14B-CoT 96 74 (-22) 78 (-18) 93 71 (-22) 55 (-38)
Qwen2.5-Coder 32B-CoT 99 81 (-18) 72 (-27) 97 78 (-19) 68 (-29)

Tables 6–8 summarize model performance on PrEx across the three dataset splits.

5.1. Performance Across Dataset Splits

Across all models, performance consistently drops between Human-Written and the other two splits, especially Fuzzer-Generated.

Each of Tables 6, 7, and 8 reports PrEx accuracy on one dataset split (Human-Written, LLM-Translated, and Fuzzer-Generated, respectively). Within each table, results are organized by semantics formalism: 𝕂\mathbb{K} semantics and 𝕊\mathbb{S} semantics (two groups of columns). For each formalism, we show accuracy under the three semantic shift configurations: Standard, KeywordSwap, and KeywordObf. Standard uses the unmodified programs; KeywordSwap and KeywordObf use the corresponding modified programs with swapped symbols and new symbols, respectively. For KeywordSwap and KeywordObf, we show, in parenthesis, percentage drop/increase compared to the Standard shift.

DeepSeek-Qwen 32B, Ministral 3 14B-CoT, and Qwen2.5-Coder 32B-CoT achieve the strongest Human-Written accuracy among all evaluated models (Table 6), but all three still degrade on other splits. On LLM-Translated programs (Table 7), mean accuracy—averaged across the six 𝕂\mathbb{K}/𝕊\mathbb{S} and semantic-shift columns in each model’s row—falls by 2.9, 8.7, and 8.6 percentage points (pp) respectively when comparing to Human-Written (Table 6). On Fuzzer-Generated programs (Table 8) the decline is even sharper, with mean drops of 19pp, 24.8pp, and 33.3pp computed the same way across Tables 8 and 6. The largest single-configuration drop reaches 55pp for Qwen2.5-Coder 14B-CoT on KeywordObf semantics under 𝕂\mathbb{K} where it falls from 78% to 23% (Qwen2.5-Coder 14B-CoT row and KeywordObf column under 𝕂\mathbb{K} semantics in Tables 6 and 8).

This performance drop extends beyond the best three performing models: every “capable model” (mean Human-Written accuracy ≥\geq 45%) loses substantial accuracy on Fuzzer-Generated programs, with mean drops ranging from 13pp to 40pp (median 24pp). Qwen2.5-Coder 14B has a smaller absolute drop under non-CoT which drops by only 13.5pp on average (the Qwen2.5-Coder 14B row averaged across all six 𝕂\mathbb{K}/𝕊\mathbb{S} and semantic-shift columns when comparing Tables 8 and 6), but its Human-Written accuracy is much lower (mean 53.8%, the same six-column average in Table 6). Somewhat differently, DeepSeek-Qwen 14B does not perform as well on Human-Written (mean 77.5% vs. 88.7%–82.5%; each the six-column row average in Table 6) yet its mean Fuzzer-Generated drop is 3.2pp below the top-three average (again averaged over the six columns in Tables 8 and 6), and no configuration falls more than 29pp (its largest drop is at Table 6/DeepSeek-Qwen 14B/𝕂\mathbb{K}/KeywordObf, from 81% to 51% in Table 8, vs. up to 55pp at Table 6/Qwen2.5-Coder 14B-CoT/𝕂\mathbb{K}/KeywordObf above).

5.2. Performance on KeywordSwap and KeywordObf

Moving from Standard to KeywordSwap or KeywordObf semantics substantially reduces accuracy across models. On Human-Written programs (Table 6), KeywordObf is consistently harder than KeywordSwap: across all models, median accuracy falls by 19pp under KeywordSwap versus 32pp under KeywordObf (each median is the drop from Standard to KeywordSwap or KeywordObf, taken over all model rows and 𝕂\mathbb{K}/𝕊\mathbb{S} formalisms in Table 6).

The top three Human-Written models (DeepSeek-Qwen 32B, Ministral 3 14B-CoT, and Qwen2.5-Coder 32B-CoT) incur mean semantic-shift drops of 15.2pp, 14.8pp, and 23.3pp, respectively (each averaged over {𝕂\mathbb{K}, 𝕊\mathbb{S}} ×\times {KeywordSwap, KeywordObf} in Table 6).

The largest Human-Written drop reaches 59pp (Ministral 3 14B under 𝕂\mathbb{K}, KeywordObf falls from 90% to 32%, Table 6), and the largest drop among the top three is Qwen2.5-Coder 32B-CoT on 𝕊\mathbb{S}, KeywordObf, which loses 29pp (from 97% to 68%, Table 6). Interestingly, DeepSeek-Qwen 32B is an outlier under KeywordObf on 𝕂\mathbb{K}, dropping only 2pp (from 99 to 98, Table 6) while its 𝕊\mathbb{S} drop is 10pp (Table 6).

On Fuzzer-Generated programs (results shown in Table 8), absolute semantic-shift drops remain large for the strongest models (e.g., Qwen2.5-Coder 32B-CoT loses 38.3pp on average), but the KeywordObf versus KeywordSwap gap narrows to 5.3pp on average (means of 26.3pp vs. 21pp) because the baseline standard accuracy is already much lower.

5.3. Rule Identification Performance by Error Type

Figure 5 breaks down per-error-type accuracy on invalid C∗ programs under 𝕊\mathbb{S} for all evaluated models.

The top row shows Human-Written programs and the bottom row shows Fuzzer-Generated programs; polygons shrink substantially on the bottom row, reflecting the split-wise accuracy drop in Table 8. Each radar axis is one model; a colored polygon that stays near the outer ring indicates reliable identification of that semantic error type across models. Across configurations, keyword-dependent errors (continue-outside-loop and break-outside-loop) shrink inward more under KeywordObf than arithmetic and scoping errors (divide-by-zero, modulo-by-zero, and variable-use-before-declare). Under KeywordSwap, divide-by-zero accuracy drops relative to Standard semantics, suggesting pretraining bias toward standard division.

5.4. Things That the Models Get Right

On Human-Written programs (Table 6), all three models are already strong under Standard (Table 6), and our inspection confirms that most remaining failures are subtle rather than a significant misunderstanding of the programs. When a model does fail on Human-Written, it typically still recognizes the relevant error category (e.g., that a break statement is illegal outside a loop), even if it cites the wrong rule number within that category.

5.5. Main Failure Modes by Dataset Split

The main failure modes differ by dataset split in ways that explain the accuracy drops reported in the previous subsections. Across all 6 configurations, Human-Written failures are relatively rare (661-1028 incorrect predictions per model out of 5,832 programs) and are split between false successes (509–779) and wrong-rule confusions (63–169). In contrast, Fuzzer-Generated and LLM-Translated failures are both more frequent and structurally different.

Table 7. PrEx accuracy on LLM-Translated programs.
Models 𝕂\mathbb{K}-semantics 𝕊\mathbb{S}-semantics
Standard KeywordSwap KeywordObf Standard KeywordSwap KeywordObf
(pp) (pp) (pp) (pp)
Random 16 16 (000) 16 (000) 16 16 (000) 16 (000)
Ministral 3 3B 44 33 (-11) 10 (-34) 41 31 (-10) 18 (-23)
Ministral 3 8B 74 59 (-15) 22 (-52) 62 48 (-14) 19 (-43)
Ministral 3 14B 80 69 (-11) 29 (-51) 76 68 (-08) 32 (-44)
Qwen2.5-Coder 3B 35 18 (-17) 16 (-19) 21 23 (+02) 18 (-03)
Qwen2.5-Coder 7B 44 18 (-26) 8 (-36) 44 25 (-19) 19 (-25)
Qwen2.5-Coder 14B 55 39 (-16) 20 (-35) 74 69 (-05) 29 (-45)
Qwen2.5-Coder 32B 60 45 (-15) 29 (-31) 88 65 (-23) 38 (-50)
DeepSeek-Qwen 14B 90 71 (-19) 77 (-13) 88 69 (-19) 60 (-28)
DeepSeek-Qwen 32B 98 75 (-23) 92 (-06) 97 70 (-27) 83 (-14)
Ministral 3 3B-CoT 88 67 (-21) 42 (-46) 88 69 (-19) 48 (-40)
Ministral 3 8B-CoT 96 78 (-18) 66 (-30) 96 78 (-18) 54 (-42)
Ministral 3 14B-CoT 97 78 (-19) 81 (-16) 88 71 (-17) 68 (-20)
Qwen2.5-Coder 3B-CoT 29 18 (-11) 14 (-15) 31 25 (-06) 16 (-15)
Qwen2.5-Coder 7B-CoT 58 36 (-22) 23 (-35) 59 37 (-22) 26 (-33)
Qwen2.5-Coder 14B-CoT 86 68 (-18) 48 (-38) 85 67 (-18) 37 (-48)
Qwen2.5-Coder 32B-CoT 95 75 (-20) 52 (-43) 95 77 (-18) 49 (-46)
Table 8. PrEx accuracy on Fuzzer-Generated programs.
Models 𝕂\mathbb{K}-semantics 𝕊\mathbb{S}-semantics
Standard KeywordSwap KeywordObf Standard KeywordSwap KeywordObf
(pp) (pp) (pp) (pp)
Random 17 17 (000) 16 (-01) 17 17 (000) 16 (-01)
Ministral 3 3B 24 26 (+02) 14 (-10) 29 17 (-12) 15 (-14)
Ministral 3 8B 43 30 (-13) 17 (-26) 35 26 (-09) 17 (-18)
Ministral 3 14B 65 37 (-28) 24 (-41) 71 31 (-40) 27 (-44)
Qwen2.5-Coder 3B 19 16 (-03) 12 (-07) 20 20 (000) 19 (-01)
Qwen2.5-Coder 7B 21 17 (-04) 16 (-05) 17 17 (000) 17 (000)
Qwen2.5-Coder 14B 58 30 (-28) 25 (-33) 65 39 (-26) 26 (-39)
Qwen2.5-Coder 32B 51 26 (-25) 28 (-23) 69 36 (-33) 34 (-35)
DeepSeek-Qwen 14B 78 43 (-35) 51 (-27) 78 42 (-36) 37 (-41)
DeepSeek-Qwen 32B 89 58 (-31) 68 (-21) 90 57 (-33) 57 (-33)
Ministral 3 3B-CoT 55 29 (-26) 28 (-27) 49 30 (-19) 24 (-25)
Ministral 3 8B-CoT 82 48 (-34) 40 (-42) 82 45 (-37) 37 (-45)
Ministral 3 14B-CoT 88 54 (-34) 66 (-22) 76 51 (-25) 52 (-24)
Qwen2.5-Coder 3B-CoT 20 14 (-06) 14 (-06) 22 18 (-04) 13 (-09)
Qwen2.5-Coder 7B-CoT 47 31 (-16) 22 (-25) 38 25 (-13) 25 (-13)
Qwen2.5-Coder 14B-CoT 68 47 (-21) 23 (-45) 69 45 (-24) 22 (-47)
Qwen2.5-Coder 32B-CoT 73 48 (-25) 24 (-49) 77 44 (-33) 29 (-48)
(a) Human-Written, Standard, 𝕊\mathbb{S}-semantics
(b) Human-Written, KeywordSwap, 𝕊\mathbb{S}-semantics
(c) Human-Written, KeywordObf, 𝕊\mathbb{S}-semantics
(d) Fuzzer-Generated, Standard, 𝕊\mathbb{S}-semantics
(e) Fuzzer-Generated, KeywordSwap, 𝕊\mathbb{S}-semantics
(f) Fuzzer-Generated, KeywordObf, 𝕊\mathbb{S}-semantics
Figure 5. Per-error-type accuracy on invalid C∗ programs across all evaluated models under 𝕊\mathbb{S}-semantics. The top row shows Human-Written programs and the bottom row shows Fuzzer-Generated programs (Standard, KeywordSwap, and KeywordObf configurations). Radar axes are models and each colored polygon is a semantic error type. Radial grid lines mark accuracy percentages, using the same rule-level criterion as Tables 6 and 8.

Human-Written. False success is the most common failure mode for DeepSeek-Qwen 32B and Qwen2.5-Coder 32B-CoT on Human-Written (549 and 779 cases respectively, aggregated across configurations). Wrong-rule errors are less frequent but when they do occur, models confuse nearby rules within the same error family, especially continue-outside-loop vs. break-outside-loop (Rules 76 vs. 73 under 𝕊\mathbb{S}) and adjacent arithmetic-error rules.

LLM-Translated and Fuzzer-Generated. On programs from the LLM-Translated split (Table 7), false success is very frequent. For example, DeepSeek-Qwen 32B produces 695 false-success errors out of 822 total failures across configurations, suggesting that models often treat translated C-like code as executable even when it violates the supplied C∗ semantics. On Fuzzer-Generated programs (Table 8), false success remains common (372–1484 cases per model), but wrong-rule (597–1003) and false-error (341–453) predictions become much more frequent as well. The most common missed rules are modulo-by-zero, break-outside-loop, and variable-use-before-declare. Malformed outputs are also more frequent on LLM-Translated and Fuzzer-Generated, especially for Ministral 3 14B-CoT.

Overall, PrEx accuracy is highest on short Human-Written programs under Standard semantics but drops sharply on Fuzzer-Generated and LLM-Translated splits, under KeywordSwap and KeywordObf shifts, and on keyword-based error types such as continue-outside-loop and break-outside-loop. The split-wise and semantic-shift declines in Tables 6–8 and Figure 5 coincide with systematic failure modes. On Human-Written, remaining errors are relatively rare and tend toward wrong-rule confusions within the same error family; on Fuzzer-Generated and LLM-Translated, false success is more common, with models frequently declaring invalid programs executable despite the supplied C∗ semantics. Taken together, these results suggest that current LLMs lean on pre-training priors rather than systematically applying the provided formal semantics even for execution prediction.

6. Qualitative Study

Table 9. Minimal Human-Written PrEx failures under 𝕊\mathbb{S}-semantics (seed 42). Both programs are 5 lines long. Highlighted lines introduce the semantic error. Even on these small examples, top models may predict the correct invalidity but cite the wrong rule.
Program Expected Model Predicted
⬇ int ans; int a; +continue; a = 156; ans = (a * a); Invalid; Rule 76 (continue-outside-loop) Qwen2.5-Coder 32B-CoT Predicted invalid but cited Rule 73 (break-outside-loop) instead of Rule 76 (wrong rule)
⬇ int ans; int a; +ans = 0; +a = (156 % ans); ans = (a * a); Invalid; Rule 23 (modulo-by-zero) DeepSeek-Qwen 32B Predicted invalid by modulo-by-zero, but cited Rule 24 instead of Rule 23 (wrong rule)

The quantitative results in Section 5 report rule-level accuracy aggregated over all programs and runs. To understand how models fail, we complement those aggregates with a qualitative pass over the three strongest PrEx models (DeepSeek-Qwen 32B, Qwen2.5-Coder 32B-CoT, and Ministral 3 14B-CoT). We only consider programs in the Human-Written split. We classify every misprediction into one of 4 failure modes:

  • •

    False success: predicts ##success## for invalid program.

  • •

    False error: predicts ##error## for valid program.

  • •

    Wrong rule: correctly predicts invalidity but cites a different violated rule than the ground truth.

  • •

    Malformed output: the model response does not contain a parseable <ans> tag.

This taxonomy uses the same rule-level criterion as the main accuracy tables: a prediction counts as correct only when both executability and the violated rule (on invalid programs) match the ground truth.

For each of the 6 PrEx configurations (𝕂\mathbb{K}/𝕊\mathbb{S} ×\times Standard/KeywordSwap/KeywordObf), we select the 2 smallest (by line count) non-empty failing programs for each top model and inspect the full model responses. The goal is not to cherry-pick hard cases, but to examine minimal counterexamples of programs where even short, explicit code still triggers systematic errors. Table 9 shows 2 of the shortest Human-Written failures under 𝕊\mathbb{S}-semantics (5 lines each). Both programs are semantically invalid for a single, localized reason; neither requires deep control-flow reasoning.

In the first example, continue appears at the top level with an empty control stack, violating Rule 76. DeepSeek-Qwen 32B and Ministral 3 14B-CoT identify this correctly, but Qwen2.5-Coder 32B-CoT predicts invalid while citing Rule 73 (break-outside-loop) instead. This matches the per-error-type pattern in Figure 5, where continue-outside-loop and break-outside-loop identification degrades more than arithmetic errors.

In the second example, ans is initialized to 0 and then used as a modulo divisor. All three models predict invalid and the correct error type (modulo-by-zero), but DeepSeek-Qwen 32B cites Rule 24 rather than Rule 23 (Rule 24 is an unrelated unary expression rule). The model therefore applies the right semantic reasoning (modulo-by-zero) but maps it to a neighboring rule in the 𝕊\mathbb{S} specification. Such off-by-one rule citations still count as incorrect under our metric even when the natural-language explanation is essentially right.

7. Related Work

LLM-Based predictive execution. A growing body of work asks whether LLMs can simulate program execution without running code. Lyu et al. (Lyu et al., 2024) treat LLMs as direct code executors, feeding snippets to the model and evaluating the returned outputs on LeetCode programs. Ni et al. (Ni et al., 2024) introduced NExT, a self-training approach that teaches LLMs to inspect execution traces and reason about run-time behavior via CoT rationales, improving program repair on MBPP and HumanEval. Li et al. (Li et al., 2025) proposed PredEx, a predictive executor for Python that combines program analysis with LLM prompting to predict full execution traces and static runtime errors. Patel et al. (Patel et al., 2025) enabled LLMs to act as predictive interpreters by autonomously navigating a program’s control-flow graph and tracking variable states at branching points to simulate execution and statically detect runtime errors. Le et al. (Le et al., 2025) proposed CodeFlow, a learned CFG-based model that combines static control-flow structure with dynamic dependencies extracted from execution traces to predict code coverage and localize runtime errors. These methods improve predictive execution through specialized training, program analysis, or learned graph models, but they evaluate implicit language semantics on real-world programs rather than testing whether models follow explicitly supplied formal rules.

Evaluating execution and runtime behavior. Complementary work evaluates code execution reasoning through benchmarks and empirical studies on real-world programs. Gu et al. (Gu et al., 2024) introduced CRUXEval, a benchmark of short Python functions with paired input–output examples and two tasks: predicting the output given an input or the input given an output. Chen et al. (Chen et al., 2025a) proposed REval, a framework that extends this line of evaluation to intermediate runtime behavior (code coverage, program state, execution path, and final output) and to incremental consistency across these dependent sub-tasks. Hora (Hora, 2024) studied a related applied setting, asking GPT-4 to predict pass/fail outcomes for Python Standard Library test cases without execution. These evaluations measure reasoning under familiar Python semantics; none supplies an explicit operational rule set in the prompt. Our PrEx task is simpler than REval’s multi-step runtime behavior reasoning, but adds matched valid/invalid C∗ programs, user-provided 𝕊\mathbb{S} and 𝕂\mathbb{K} semantics, and KeywordSwap/KeywordObf shifts to diagnose whether predictions follow the given rules or priors.

Semantics, identifiers, and formal properties. Other work examines whether LLMs reason from program logic or from surface cues and formal semantic properties. Wang et al. (Wang et al., 2024) showed that replacing variable, method, and function names with nonsense or misleading identifiers substantially degrades CodeBERT performance on code analysis tasks, indicating that models rely heavily on identifier semantics rather than logic alone. Sultan et al. (Sultan et al., 2026) evaluated frontier LLMs on SV-Comp termination tasks, finding that models can approach specialized verifiers in termination classification yet frequently fail to produce machine-valid witness proofs. Chen et al. (Chen et al., 2025b) applied LLMs to dead code elimination, using a small classifier to locate suspect lines and a fine-tuned model to judge, explain, and patch unreachable or unused code. The naming results motivate our semantic-shift conditions: KeywordSwap and KeywordObf perturb familiar symbol meanings to test whether models condition on provided rules rather than pre-trained associations. Together with the termination and dead-code studies, they highlight that LLM “understanding” of code semantics remains fragile; PrEx offers a controlled executability baseline in which success requires applying supplied formal rules to predict whether execution succeeds or violates a specific rule.

8. Conclusion

We introduced Program Executability Prediction (PrEx), a task that asks models, when given a program and formal programming language semantics, to predict whether execution succeeds or halts on a semantic error and, when it fails, which rule was violated. Through PrEx, we can evaluate whether LLMs apply explicitly provided programming-language semantics or fall back on pre-training priors. Building on valid C∗ programs from PLSemanticsBench, we extended the benchmark with invalid programs produced by five semantics-aware invalid transformations, and evaluated open-source coding LLMs under 𝕊\mathbb{S} and 𝕂\mathbb{K} formalisms, KeywordSwap and KeywordObf semantic shifts, and three program data splits (Human-Written, LLM-Translated, and Fuzzer-Generated). We find that current models struggle to follow the supplied semantics. Accuracy is highest on short Human-Written programs under standard semantics, but drops sharply under semantic shifts and on longer, structurally complex LLM-Translated and Fuzzer-Generated programs. Our results show that LLMs do not yet reliably reason from supplied formal semantics and still heavily rely on patterns learned in their pre-training.

Acknowledgments

We thank Cheng Ding, Ivan Grigorik, Yan Levin, Tong-Nong Lin, Karl Palmskog, Samuel Yuan, Linghan Zhong, and the anonymous reviewers for helpful feedback and discussions. Computational resources were provided by the Texas Advanced Computing Center (TACC22 2 https://www.tacc.utexas.edu/) at the University of Texas at Austin, and AMD (University Program AI & HPC Cluster). This work was supported in part by the U.S. National Science Foundation (NSF) Nos. CCF-2217696, CCF-2313027, CCF-2403036; the NSF–Simons AI Institute for Cosmic Origins (CosmicAI33 3 https://www.cosmicai.org/) funded by NSF award AST-2421782; the Simons Foundation (MPS-AI-00010515); and a sponsored research award from Cisco. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the sponsoring entities.

References

  • Aho et al. (2006) A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman Compilers: principles, techniques, and tools (2nd edition). Addison-Wesley Longman Publishing Co., Inc., USA. External Links: ISBN 0321486811 Cited by: §2.
  • Appel (1997) A. W. Appel Modern compiler implementation in ml: basic techniques. Cambridge University Press, USA. External Links: ISBN 052158275X Cited by: §2.
  • Austin et al. (2021) J. Austin, A. Odena, M. Nye, M. Bosma, H. Michalewski, D. Dohan, E. Jiang, C. Cai, M. Terry, Q. Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732. External Links: Document Cited by: §4.
  • Bernstein et al. (2026) S. Bernstein, D. Beste, D. Ayzenshteyn, L. Schonherr, and Y. Mirsky Trust me, i know this function: hijacking LLM static analysis using bias. In NDSS, External Links: Document Cited by: §1.
  • Chen et al. (2025a) J. Chen, Z. Pan, X. Hu, Z. Li, G. Li, and X. Xia Reasoning runtime behavior of a program with LLM: how far are we?. In ICSE, pp. 1869–1881. External Links: Document Cited by: §7.
  • Chen et al. (2021) M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. D. O. Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374. External Links: Document Cited by: §4.
  • Chen et al. (2025b) M. Chen, G. Li, L. Wu, and R. Liu DCE-LLM: dead code elimination with large language models. In NAACL, pp. 9942–9955. External Links: Document Cited by: §7.
  • Euraste et al. (2026) D. A. Euraste, A. K. Kaboré, J. Samhi, E. T. Barr, J. Klein, and T. F. Bissyandé Learned or memorized? quantifying memorization advantage in code LLMs. In ICSE, External Links: Document Cited by: §1.
  • Gentzen (1964) G. Gentzen Investigations into logical deduction. American philosophical quarterly 1 (4), pp. 288–306. Cited by: §3.2.
  • Gu et al. (2024) A. Gu, B. Rozière, H. J. Leather, A. Solar-Lezama, G. Synnaeve, and S. Wang CRUXEval: a benchmark for code reasoning, understanding and execution. In ICML, pp. 16568–16621. External Links: Document Cited by: §7.
  • Guo et al. (2023) D. Guo, C. Xu, N. Duan, J. Yin, and J. McAuley LongCoder: a long-range pre-trained language model for code completion. In ICML, External Links: Document Cited by: §1.
  • Guo et al. (2025) D. Guo, D. Yang, H. Zhang, J. Song, R. Zhang, R. Xu, Q. Zhu, S. Ma, P. Wang, X. Bi, et al. Deepseek-R1: incentivizing reasoning capability in llms via reinforcement learning. Nature, pp. 633–638. External Links: Document Cited by: §5.
  • Han et al. (2019) H. Han, D. Oh, and S. K. Cha CodeAlchemist: semantics-aware code generation to find vulnerabilities in JavaScript engines. In NDSS, External Links: Document Cited by: §4.
  • Hora (2024) A. Hora Predicting test results without execution. In FSE Companion, pp. 542–546. External Links: Document Cited by: §7.
  • Hossain et al. (2024) S. B. Hossain, N. Jiang, Q. Zhou, X. Li, W. Chiang, Y. Lyu, H. Nguyen, and O. Tripp A deep dive into large language models for automated bug localization and repair. (FSE), pp. 1471 – 1493. External Links: Document Cited by: §1.
  • Hui et al. (2024) B. Hui, J. Yang, Z. Cui, J. Yang, D. Liu, L. Zhang, T. Liu, J. Zhang, B. Yu, K. Lu, et al. Qwen2.5-coder technical report. arXiv preprint arXiv:2409.12186. External Links: Document Cited by: §5.
  • Le et al. (2025) C. C. Le, H. N. Phan, H. N. Phan, T. N. Nguyen, and N. D. Q. Bui CodeFlow: program behavior prediction with dynamic dependencies learning. In FORGE, pp. 192–203. External Links: Document Cited by: §7.
  • LeetCode (2024) LeetCode LeetCode Online Judge. Note: Accessed: 2025-05-16 External Links: Link Cited by: §4.
  • Li et al. (2025) Y. Li, H. Dhulipala, A. Yadavally, X. Rong, S. Wang, and T. N. Nguyen Blended analysis for predictive execution. pp. 2987 – 3008. External Links: Document Cited by: §7.
  • Li et al. (2022) Y. Li, D. Choi, J. Chung, N. Kushman, J. Schrittwieser, R. Leblond, T. Eccles, J. Keeling, F. Gimeno, A. D. Lago, T. Hubert, P. Choy, C. de Masson d’Autume, I. Babuschkin, X. Chen, P. Huang, J. Welbl, S. Gowal, A. Cherepanov, J. Molloy, D. J. Mankowitz, E. S. Robson, P. Kohli, N. de Freitas, K. Kavukcuoglu, and O. Vinyals Competition-level code generation with AlphaCode. Science, pp. 1092–1097. External Links: Document Cited by: §4.
  • Liu et al. (2026) A. H. Liu, K. Khandelwal, S. Subramanian, V. Jouault, A. Rastogi, A. Sadé, A. Jeffares, A. Jiang, A. Cahill, A. Gavaudan, A. Sablayrolles, A. Héliou, A. You, A. Ehrenberg, A. Lo, A. Eliseev, A. Calvi, A. Sooriyarachchi, B. Bout, B. Rozière, B. D. Monicault, C. Lanfranchi, C. Barreau, C. Courtot, D. Grattarola, D. Dabert, D. de las Casas, E. Chane-Sane, F. Ahmed, G. Berrada, G. Ecrepont, G. Guinet, G. Novikov, G. Kunsch, G. Lample, G. Martin, G. Gupta, J. Ludziejewski, J. Rute, J. Studnia, J. Amar, J. Delas, J. S. Roberts, K. Yadav, K. Chandu, K. Jain, L. Aitchison, L. Fainsin, L. Blier, L. Zhao, L. Martin, L. Saulnier, L. Gao, M. Buyl, M. Jennings, M. Pellat, M. Prins, M. Poirée, M. Guillaumin, M. Dinot, M. Futeral, M. Darrin, M. Augustin, M. Chiquier, M. Schimpf, N. Grinsztajn, N. Gupta, N. Raghuraman, O. Bousquet, O. Duchenne, P. Wang, P. von Platen, P. Jacob, P. Wambergue, P. Kurylowicz, P. R. Muddireddy, P. Chagniot, P. Stock, P. Agrawal, Q. Torroba, R. Sauvestre, R. Soletskyi, R. Menneer, S. Vaze, S. Barry, S. Gandhi, S. Waghjale, S. Gandhi, S. Ghosh, S. Mishra, S. Aithal, S. Antoniak, T. L. Scao, T. Cachet, T. S. Sorg, T. Lavril, T. N. Saada, T. Chabal, T. Foubert, T. Robert, T. Wang, T. Lawson, T. Bewley, T. Bewley, T. Edwards, U. Jamil, U. Tomasini, V. Nemychnikova, V. Phung, V. Maladière, V. Richard, W. Bouaziz, W. Li, W. Marshall, X. Li, X. Yang, Y. E. Ouahidi, Y. Wang, Y. Tang, and Z. Ramzi Ministral 3. External Links: Document Cited by: §5.
  • Liu et al. (2024) Y. Liu, P. Gao, X. Wang, J. Liu, Y. Shi, Z. Zhang, and C. Peng MarsCode agent: AI-native automated bug fixing. External Links: Document Cited by: §1.
  • Lomshakov et al. (2024) V. Lomshakov, A. Podivilov, S. Savin, O. Baryshnikov, A. Lisevych, and S. Nikolenko ProConSuL: project context for code summarization with LLMs. In EMNLP, pp. 866–880. External Links: Document Cited by: §1.
  • Lu et al. (2022) S. Lu, N. Duan, H. Han, D. Guo, S. Hwang, and A. Svyatkovskiy ReACC: a retrieval-augmented code completion framework. In ACL, pp. 6227–6240. External Links: Document Cited by: §1.
  • Lyu et al. (2024) C. Lyu, L. Yan, R. Xing, W. Li, Y. Samih, T. Ji, and L. Wang Large language models as code executors: an exploratory study. External Links: Document Cited by: §7.
  • Macedo et al. (2025) M. Macedo, Y. Tian, P. Nie, F. R. Cogo, and B. Adams INTERTRANS: leveraging transitive intermediate translations to enhance LLM-based code translation. In ICSE, pp. 1153–1164. External Links: Document Cited by: §1.
  • Makharev and Ivanov (2025) V. Makharev and V. Ivanov Code summarization beyond function level. In LLM4Code, pp. 153–160. External Links: Document Cited by: §1.
  • Malfa et al. (2024) E. L. Malfa, C. Weinhuber, O. Torre, F. Lin, S. Marro, A. Cohn, N. Shadbolt, and M. Wooldridge Code simulation challenges for large language models. External Links: Document Cited by: §1.
  • Meeus et al. (2026) M. Meeus, A. Ramakrishna, M. Grange, Z. Xu, and L. Melis Detecting functional memorization in code language models. In ICML, External Links: Document Cited by: §1.
  • Ni et al. (2024) A. Ni, M. Allamanis, A. Cohan, Y. Deng, K. Shi, C. Sutton, and P. Yin NEXT: teaching large language models to reason about code execution. In ICML, pp. 37929 – 37956. External Links: Document Cited by: §7.
  • Nijkamp et al. (2023) E. Nijkamp, B. Pang, H. Hayashi, L. Tu, H. Wang, Y. Zhou, S. Savarese, and C. Xiong CodeGen: an open large language model for code with multi-turn program synthesis. In ICLR, External Links: Document Cited by: §1.
  • Patel et al. (2025) S. Patel, A. Yadavally, H. Dhulipala, and T. N. Nguyen Planning a large language model for static detection of runtime errors in code snippets. In ICSE, pp. 872–884. External Links: Document Cited by: §7.
  • Penedo et al. (2025) G. Penedo, A. Lozhkov, H. Kydlíček, L. B. Allal, E. Beeching, A. P. Lajarín, Q. Gallouédec, N. Habib, L. Tunstall, and L. von Werra CodeForces. Hugging Face. Note: https://huggingface.co/datasets/open-r1/codeforces Cited by: §4.
  • Plotkin (2004) G. D. Plotkin A structural approach to operational semantics. J. Log. Algebraic Methods Program., pp. 17–139. Cited by: §1, §3.2.
  • Roșu and Șerbănută (2010) G. Roșu and T. F. Șerbănută An overview of the k semantic framework. The Journal of Logic and Algebraic Programming 79 (6), pp. 397–434. Cited by: §1, §3.2.
  • Štorek et al. (2026) A. Štorek, M. Gupta, S. Hajizadeh, P. Srivastava, and S. Jana Sense and sensitivity: examining the influence of semantic recall on long context code understanding. In ACL, pp. 480–498. External Links: Document Cited by: §1.
  • Sultan et al. (2026) O. Sultan, J. Armengol-Estapé, P. Kesseli, J. Vanegue, D. Shahaf, Y. Adi, and P. O’Hearn LLMs versus the halting problem: characterizing program termination reasoning. In EMNLP, External Links: Document Cited by: §7.
  • Sun et al. (2025) W. Sun, Y. Miao, Y. Li, H. Zhang, C. Fang, Y. Liu, G. Deng, Y. Liu, and Z. Chen Source code summarization in the era of large language models. In ICSE, pp. 1882–1894. External Links: Document Cited by: §1.
  • Thimmaiah et al. (2026) A. Thimmaiah, J. Zhang, J. Srinivasa, J. J. Li, and M. Gligoric LLMs lean on priors, not programming language semantics. External Links: Document Cited by: §1, §3.
  • Verification (2025) R. Verification K: a framework for formal semantics. Note: Accessed: 2025-03-25 External Links: Link Cited by: §3.2.
  • Wang et al. (2024) Z. Wang, L. Zhang, C. Cao, N. Luo, X. Luo, and P. Liu How does naming affect LLMs on code analysis tasks?. In JSEA, pp. 803–816. External Links: Document Cited by: §1, §7.
  • Yang et al. (2011) X. Yang, Y. Chen, E. Eide, and J. Regehr Finding and understanding bugs in c compilers. In PLDI, pp. 283––294. Cited by: §4.
  • Yang et al. (2024a) Z. Yang, F. Liu, Z. Yu, J. W. Keung, J. Li, S. Liu, Y. Hong, X. Ma, Z. Jin, and G. Li Exploring and unleashing the power of large language models in automated code translation. In FSE, pp. 1585–1608. External Links: Document Cited by: §1.
  • Yang et al. (2024b) Z. Yang, Z. Zhao, C. Wang, J. Shi, D. Kim, D. Han, and D. Lo Unveiling memorization in code models. In ICSE, pp. 1 – 13. External Links: Document Cited by: §1.
  • Zheng et al. (2023) Q. Zheng, X. Xia, X. Zou, Y. Dong, S. Wang, Y. Xue, L. Shen, Z. Wang, A. Wang, Y. Li, et al. Codegeex: a pre-trained model for code generation with multilingual benchmarking on humaneval-x. In KDD, pp. 5673–5684. External Links: Document Cited by: §4.