paper-with-me

홈 › Papers

Towards Large Language Model Aided Program Refinement

2024-06-26 · Yufan Cai, Zhe Hou, Xiaokun Luan, David Miguel Sanan Baena, Yun Lin, Jun Sun, Jin Song Dong

Program refinement involves correctness-preserving transformations from formal high-level specification statements into executable programs. Traditional verification tool support for program refinement is highly interactive and lacks automation. On the other hand, the emergence of large language models (LLMs) enables automatic code generations from informal natural language specifications. However, code generated by LLMs is often unreliable. Moreover, the opaque procedure from specification to code provided by LLM is an uncontrolled black box. We propose LLM4PR, a tool that combines formal program refinement techniques with informal LLM-based methods to (1) transform the specification to preconditions and postconditions, (2) automatically build prompts based on refinement calculus, (3) interact with LLM to generate code, and finally, (4) verify that the generated code satisfies the conditions of refinement calculus, thus guaranteeing the correctness of the code. We have implemented our tool using GPT4, Coq, and Coqhammer, and evaluated it on the HumanEval and EvalPlus datasets.

📄 PDF Abstract BibTeX arXiv:2406.18616

Code (0)

등록된 구현이 없습니다.

Tasks

HumanEvalLanguage ModelingLanguage ModellingLarge Language Modelmodel

Similar Papers 제목 키워드 기반

Load Disaggregation Based on Aided Linear Integer Programming

2016-03-24 · Md. Zulfiquar Ali Bhotto, Stephen Makonin, Ivan V. Bajic

Load disaggregation based on aided linear integer programming (ALIP) is proposed. We start with a conventional linear integer programming (IP) based disaggregation and enhance it in several ways. The enhancements include…

Program-Aided Reasoners (better) Know What They Know

2023-11-16 · Anubha Kabra, Sanketh Rangreji, Yash Mathur, Aman Madaan 외

Prior work shows that program-aided reasoning, in which large language models (LLMs) are combined with programs written in programming languages such as Python, can significantly improve accuracy on various reasoning tas…

Diversity

SatLM: Satisfiability-Aided Language Models Using Declarative Prompting

2023-05-16 · NeurIPS 2023 11 · Xi Ye, Qiaochu Chen, Isil Dillig, Greg Durrett

Prior work has combined chain-of-thought prompting in large language models (LLMs) with programmatic representations to perform effective and transparent reasoning. While such an approach works well for tasks that only r…

Arithmetic ReasoningLanguage ModelingLanguage Modelling

ProgCo: Program Helps Self-Correction of Large Language Models

2025-01-02 · Xiaoshuai Song, Yanan Wu, Weixun Wang, Jiaheng Liu 외

Self-Correction aims to enable large language models (LLMs) to self-verify and self-refine their initial responses without external feedback. However, LLMs often fail to effectively self-verify and generate correct feedb…

Instruction Following

InvWeaver: Deductive Feedback for Invariant Synthesis in Interacting-Loop Programs

2026-07-06 · Guangyuan Wu, Weining Cao, Zehui Tan, Yuan Yao 외 arxiv

Loop invariant inference is a fundamental yet challenging problem in program verification. Recent LLM-aided guess-and-check techniques have shown strong performance on single-loop programs, but they often struggle with p…