mlsanityData to 7 Oct 2026

On the Effectiveness of Large Language Models in Writing Alloy Formulas

arXiv 2502.15441 ↗First posted 21 Feb 2025cs.SE cs.AI cs.FLcited by 7

Not on the map. Why?

Abstract (arXiv)

Declarative specifications have a vital role to play in developing safe and dependable software systems. Writing specifications correctly, however, remains particularly challenging. This paper presents a controlled experiment on using large language models (LLMs) to write declarative formulas in the well-known language Alloy. Our use of LLMs is three-fold. One, we employ LLMs to write complete Alloy formulas from given natural language descriptions (in English). Two, we employ LLMs to create alternative but equivalent formulas in Alloy with respect to given Alloy formulas. Three, we employ LLMs to complete sketches of Alloy formulas and populate the holes in the sketches by synthesizing Alloy expressions and operators so that the completed formulas accurately represent the desired properties (that are given in natural language). We conduct the experimental evaluation using 11 well-studied subject specifications and employ two popular LLMs, namely ChatGPT and DeepSeek. The experimental results show that the LLMs generally perform well in synthesizing complete Alloy formulas from input properties given in natural language or in Alloy, and are able to enumerate multiple unique solutions. Moreover, the LLMs are also successful at completing given sketches of Alloy formulas with respect to natural language descriptions of desired properties (without requiring test cases). We believe LLMs offer a very exciting advance in our ability to write specifications, and can help make specifications take a pivotal role in software development and enhance our ability to build robust software.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 22 of its 83 references that are in the map. First posted on arXiv 21 Feb 2025.

Builds on

22 of 83 references.

References · 22

  1. 2023A Survey of Large Language Modelscited by 2,537
  2. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  3. 2023Using an LLM to Help With Code Understandingcited by 222
  4. 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
  5. 2023Baldur: Whole-Proof Generation and Repair with Large Language Modelscited by 118
  6. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
  7. 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
  8. 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
  9. 2023A Quantitative and Qualitative Evaluation of LLM-Based Explainable Fault Localizationcited by 50
  10. 2023Make LLM a Testing Expert: Bringing Human-like Interaction to Mobile GUI Testing via Functionality-aware Decisionscited by 41
  11. 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
  12. 2024LLMParser: An Exploratory Study on Using Large Language Models for Log Parsingcited by 32
10 more
  1. 2023LILAC: Log Parsing using LLMs with Adaptive Parsing Cachecited by 30
  2. 2024Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by Examplecited by 15
  3. 2024Rocks Coding, Not Development--A Human-Centric, Experimental Evaluation of LLM-Supported SE Taskscited by 13
  4. 2024Generating executable oracles to check conformance of client code to requirements of JDK Javadocs using LLMscited by 6
  5. 2023Uncovering the Causes of Emotions in Software Developer Communication Using Zero-shot LLMscited by 5
  6. 2024An Empirical Evaluation of Pre-trained Large Language Models for Repairing Declarative Formal Specificationscited by 5
  7. 2015JSKETCH: Sketching for Javacited by 3
  8. 2014CD2Alloy: Class Diagrams Analysis Using Alloy Revisitedcited by 1
  9. 2014CDDiff: Semantic Differencing for Class Diagramscited by 1
  10. 2023Automated Repair of Declarative Software Specifications in the Era of Large Language Modelscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 3.

7 papers.