paper-with-me

Papers

ASSERTIFY: Utilizing Large Language Models to Generate Assertions for Production Code

2024-11-25 · Mohammad Jalili Torkamani, Abhinav Sharma, Nikita Mehrotra, Rahul Purandare

Production assertions are statements embedded in the code to help developers validate their assumptions about the code. They assist developers in debugging, provide valuable documentation, and enhance code comprehension. Current research in this area primarily focuses on assertion generation for unit tests using techniques, such as static analysis and deep learning. While these techniques have shown promise, they fall short when it comes to generating production assertions, which serve a different purpose. This preprint addresses the gap by introducing Assertify, an automated end-to-end tool that leverages Large Language Models (LLMs) and prompt engineering with few-shot learning to generate production assertions. By creating context-rich prompts, the tool emulates the approach developers take when creating production assertions for their code. To evaluate our approach, we compiled a dataset of 2,810 methods by scraping 22 mature Java repositories from GitHub. Our experiments demonstrate the effectiveness of few-shot learning by producing assertions with an average ROUGE-L score of 0.526, indicating reasonably high structural similarity with the assertions written by developers. This research demonstrates the potential of LLMs in automating the generation of production assertions that resemble the original assertions.

📄 PDF Abstract BibTeX arXiv:2411.16927

Code (1)

mohammadJaliliTorkamani/Kajal

Tasks

Few-Shot LearningPrompt Engineering

Similar Papers 제목 키워드 기반

System-on-Chip Security Assertions

2020-01-18

Assertions are widely used for functional validation as well as coverage analysis for both software and hardware designs. Assertions enable runtime error detection as well as faster localization of errors. While there is…

AssertionBench: A Benchmark to Evaluate Large-Language Models for Assertion Generation

2024-06-26 · Vaishnavi Pulavarthi, Deeksha Nandal, Soham Dan, Debjit Pal

Assertions have been the de facto collateral for simulation-based and formal verification of hardware designs for over a decade. The quality of hardware verification, \ie, detection and diagnosis of corner-case design bu…

Prompt Engineering

(Security) Assertions by Large Language Models

2023-06-24 · Rahul Kande, Hammond Pearce, Benjamin Tan, Brendan Dolan-Gavitt 외

The security of computer systems typically relies on a hardware root of trust. As vulnerabilities in hardware can have severe implications on a system, there is a need for techniques to support security verification acti…

Code Generation

Laurel: Unblocking Automated Verification with Large Language Models

2024-05-27 · Eric Mugnier, Emmanuel Anaya Gonzalez, Ranjit Jhala, Nadia Polikarpova 외

Program verifiers such as Dafny automate proofs by outsourcing them to an SMT solver. This automation is not perfect, however, and the solver often requires hints in the form of assertions, creating a burden for the proo…

LEMMA

Viverra: Text-to-Code with Guarantees

2026-05-14 · Haoze Wu, Rocky Klopfenstein, Keith Farkas, Nina Narodytska arxiv

A fundamental limitation of Text-to-Code is that no guarantee can be obtained about the correctness of the generated code. Therefore, to ensure its correctness, the generated code still has to be reviewed, tested, and ma…