Can Language Models Pretend Solvers? Logic Code Simulation with LLMs
Not on the map. Why?
Abstract (arXiv)
Transformer-based large language models (LLMs) have demonstrated significant potential in addressing logic problems. capitalizing on the great capabilities of LLMs for code-related activities, several frameworks leveraging logical solvers for logic reasoning have been proposed recently. While existing research predominantly focuses on viewing LLMs as natural language logic solvers or translators, their roles as logic code interpreters and executors have received limited attention. This study delves into a novel aspect, namely logic code simulation, which forces LLMs to emulate logical solvers in predicting the results of logical programs. To further investigate this novel task, we formulate our three research questions: Can LLMs efficiently simulate the outputs of logic codes? What strength arises along with logic code simulation? And what pitfalls? To address these inquiries, we curate three novel datasets tailored for the logic code simulation task and undertake thorough experiments to establish the baseline performance of LLMs in code simulation. Subsequently, we introduce a pioneering LLM-based code simulation technique, Dual Chains of Logic (DCoL). This technique advocates a dual-path thinking approach for LLMs, which has demonstrated state-of-the-art performance compared to other LLM prompt strategies, achieving a notable improvement in accuracy by 7.06% with GPT-4-Turbo.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 35 of its 50 references that are in the map. First posted on arXiv 24 Mar 2024.
Builds on
35 of 50 references.
References · 35
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 550
- 2023Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoningcited by 379
- 2023Language Models can Solve Computer Taskscited by 371
- 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thoughtcited by 334
- 2020ProofWriter: Generating Implications, Proofs, and Abductive Statements over Natural Languagecited by 309
23 more
- 2023Faithful Chain-of-Thought Reasoningcited by 285
- 2022FOLIO: Natural Language Reasoning with First-Order Logiccited by 233
- 2023Looped Transformers as Programmable Computerscited by 224
- 2023LINC: A Neurosymbolic Approach for Logical Reasoning by Combining Language Models with First-Order Logic Proverscited by 161
- 2023Deductive Verification of Chain-of-Thought Reasoningcited by 122
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
- 2023SatLM: Satisfiability-Aided Language Models Using Declarative Promptingcited by 100
- 2024Premise Order Matters in Reasoning with Large Language Modelscited by 71
- 2023Large Language Models for Test-Free Fault Localizationcited by 67
- 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
- 2023Memory Augmented Large Language Models are Computationally Universalcited by 45
- 2023Code Execution with Pre-trained Language Modelscited by 33
- 2023CoderEval: A Benchmark of Pragmatic Code Generation with Generative Pre-trained Modelscited by 28
- 2023Language Models can be Logical Solverscited by 24
- 2024LLMs for Relational Reasoning: How Far are We?cited by 21
- 2023GrACE: Generation using Associated Code Editscited by 16
- 2024Code Simulation Challenges for Large Language Modelscited by 15
- 2022SATformer: Transformer-Based UNSAT Core Learningcited by 14
- 2024DiLA: Enhancing LLM Tool Learning with Differential Logic Layercited by 6
- 2024SymBa: Symbolic Backward Chaining for Structured Natural Language Reasoningcited by 6
- 2018SMT-Based Refutation of Spurious Bug Reports in the Clang Static Analyzercited by 5
- 2023InfeRE: Step-by-Step Regex Generation via Chain of Inferencecited by 5
- 2019Practical Constraint Solving for Generating System Test Datacited by 4
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 1.
4 papers.
- 2024Can Transformers Reason Logically? A Study in SAT Solvingcited by 16
- 2025Synergizing Logical Reasoning, Knowledge Management and Collaboration in Multi-Agent LLM Systemcited by 10
- 2026Neuro-Symbolic Compliance: Integrating LLMs and SMT Solvers for Automated Financial Legal Analysiscited by 3
- 2025Can LLMs Solve ASP Problems? Insights from a Benchmarking Study (Extended Version)cited by 1
- 2026Neuro-Symbolic Compliance: Integrating LLMs and SMT Solvers for Automated Financial Legal Analysis7 Jan 2026
- 2025Can LLMs Solve ASP Problems? Insights from a Benchmarking Study (Extended Version)26 Jul 2025
- 2025Synergizing Logical Reasoning, Knowledge Management and Collaboration in Multi-Agent LLM System2 Jul 2025
- 2024Can Transformers Reason Logically? A Study in SAT Solving9 Oct 2024