Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
80 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Towards Large Language Model Aided Program Refinement (2406.18616v1)

Published 26 Jun 2024 in cs.SE, cs.AI, and cs.CL

Abstract: 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 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.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (7)
  1. Yufan Cai (3 papers)
  2. Zhe Hou (41 papers)
  3. Xiaokun Luan (5 papers)
  4. David Miguel Sanan Baena (1 paper)
  5. Yun Lin (45 papers)
  6. Jun Sun (210 papers)
  7. Jin Song Dong (49 papers)
Citations (1)
X Twitter Logo Streamline Icon: https://streamlinehq.com