Pith. sign in

REVIEW 3 cited by

Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2310.01831 v2 pith:J6EXYNCL submitted 2023-10-03 cs.SE cs.AIcs.PL

classification cs.SEcs.AIcs.PL
keywords languagenaturalintentnl2postcondpostconditionscodellmsformal
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Informal natural language that describes code functionality, such as code comments or function documentation, may contain substantial information about a programs intent. However, there is typically no guarantee that a programs implementation and natural language documentation are aligned. In the case of a conflict, leveraging information in code-adjacent natural language has the potential to enhance fault localization, debugging, and code trustworthiness. In practice, however, this information is often underutilized due to the inherent ambiguity of natural language which makes natural language intent challenging to check programmatically. The emergent abilities of Large Language Models (LLMs) have the potential to facilitate the translation of natural language intent to programmatically checkable assertions. However, it is unclear if LLMs can correctly translate informal natural language specifications into formal specifications that match programmer intent. Additionally, it is unclear if such translation could be useful in practice. In this paper, we describe nl2postcond, the problem of leveraging LLMs for transforming informal natural language to formal method postconditions, expressed as program assertions. We introduce and validate metrics to measure and compare different nl2postcond approaches, using the correctness and discriminative power of generated postconditions. We then use qualitative and quantitative methods to assess the quality of nl2postcond postconditions, finding that they are generally correct and able to discriminate incorrect code. Finally, we find that nl2postcond via LLMs has the potential to be helpful in practice; nl2postcond generated postconditions were able to catch 64 real-world historical bugs from Defects4J.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Disproving Program Equivalence with LLMs

    cs.SE 2025-02 conditional novelty 7.0 of 10

    LLM-generated probes with execution feedback find counterexamples that unit tests miss, and semantic clustering based on these probes improves code-generation evaluation.

  2. DeCon: Detecting Incorrect Assertions via Postconditions Generated by a Large Language Model

    cs.SE 2025-01 conditional novelty 6.0 of 10

    DeCon detects incorrect LLM-generated assertions by checking each assertion against LLM-generated postconditions that have been filtered against docstring I/O examples.

  3. The Current Challenges of Software Engineering in the Era of Large Language Models

    cs.SE 2024-12 conditional novelty 4.0 of 10

    The paper reports 26 challenges in LLM-based software engineering, grouped into seven aspects, derived from a structured discussion among 24 academics and practitioners.

Pith tools