Conceptio › Archive › arXiv (All)
arXiv (All) open access

On the Effectiveness of Large Language Models in Writing Alloy Formulas

Hong, Yang et al. · 2025 · arxiv_all
arXiv (All) · Papers · 2025
Open Source ↗Direct PDF ↓
artificial-intelligenceformal-languages-and-automata-theoryprogramming-languagessoftware-engineering
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

[2502.15441] On the Effectiveness of Large Language Models in Writing Alloy Formulas Skip to main content Search Submit Donate Log in Search arXiv Press Enter to search · Advanced search Computer Science > Software Engineering arXiv:2502.15441 (cs) [Submitted on 21 Feb 2025] Title: On the Effectiveness of Large Language Models in Writing Alloy Formulas Authors: Yang Hong , Shan Jiang , Yulei Fu , Sarfraz Khurshid View a PDF of the paper titled On the Effectiveness of Large Language Models in Writing Alloy Formulas, by Yang Hong and 3 other authors View PDF HTML (experimental) 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 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. Subjects: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI); Formal Languages and Automata Theory (cs.FL); Programming Languages (cs.PL) Cite as: arXiv:2502.15441 [cs.SE] (or arXiv:2502.15441v1 [cs.SE] for this version) https://doi.org/10.48550/arXiv.2502.15441 Focus to learn more arXiv-issued DOI via DataCite Related DOI : https://doi.org/10.1145/3822455.3830309 Focus to learn more DOI(s) linking to related resources Submission history From: Shan Jiang [ view email ] [v1] Fri, 21 Feb 2025 13:09:58 UTC (122 KB) Full-text links: Access Paper: View a PDF of the paper titled On the Effectiveness of Large Language Models in Writing Alloy Formulas, by Yang Hong and 3 other authors View PDF HTML (experimental) TeX Source view license Current browse context: cs.SE < prev | next > new | recent | 2025-02 Change to browse by: cs cs.AI cs.FL cs.PL References & Citations NASA ADS Google Scholar Semantic Scholar export BibTeX citation Loading... BibTeX formatted citation × loading... Data provided by: Bookmark Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer ( What is the Explorer? ) Connected Papers Toggle Connected Papers ( What is Connected Papers? ) Litmaps Toggle Litmaps ( What is Litmaps? ) scite.ai Toggle scite Smart Citations ( What are Smart Citations? ) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv ( What is alphaXiv? ) Links to Code Toggle CatalyzeX Code Finder for Papers ( What is CatalyzeX? ) DagsHub Toggle DagsHub ( What is DagsHub? ) GotitPub Toggle Gotit.pub ( What is GotitPub? ) Huggingface Toggle Hugging Face ( What is Huggingface? ) ScienceCast Toggle ScienceCast ( What is ScienceCast? ) Demos Demos Replicate Toggle Replicate ( What is Replicate? ) Spaces Toggle Hugging Face Spaces ( What is Spaces? ) Spaces Toggle TXYZ.AI ( What is TXYZ.AI? ) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower ( What are Influence Flowers? ) Core recommender toggle CORE Recommender ( What is CORE? ) Author Venue Institution Topic About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs . Which authors of this paper are endorsers? | Disable MathJax ( What is MathJax? ) We gratefully acknowledge support from our major funders , member institutions , , and all contributors. About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab) Major funding support from

Related documents

Record · ID 609768 · SHA-256 5b38c65aea2c3fa2
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive