Content area

Abstract

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 using large language models (LLMs) to write declarative formulas in the well-known language Alloy. Our use of LLMs is four-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 the given Alloy formulas. Three, we employ LLMs to determine whether the given Alloy formulas match the given natural language descriptions. Four, 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) and/or with respect to given tests. We conduct the experimental evaluation using 21 well-studied subject specifications and employ two popular LLMs, namely ChatGPT and Claude. 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 able to complete given sketches of simple Alloy formulas with respect to natural language descriptions of desired properties and/or given tests. We believe LLMs offer a promising 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.

Details

1010268
Title
On the Effectiveness of Large Language Models in Writing Alloy Formulas
Author
Number of pages
59
Publication year
2025
Degree date
2025
School code
0227
Source
MAI 87/6(E), Masters Abstracts International
ISBN
9798270233143
Committee member
Garg, Vijay
University/institution
The University of Texas at Austin
Department
Electrical and Computer Engineering
University location
United States -- Texas
Degree
M.S.Eng.
Source type
Dissertation or Thesis
Language
English
Document type
Dissertation/Thesis
Dissertation/thesis number
32460864
ProQuest document ID
3284363015
Document URL
https://www.proquest.com/dissertations-theses/on-effectiveness-large-language-models-writing/docview/3284363015/se-2?accountid=208611
Copyright
Database copyright ProQuest LLC; ProQuest does not claim copyright in the individual underlying works.
Database
ProQuest One Academic