{"id":{"repo_id":"texas","oai_identifier":"oai:repositories.lib.utexas.edu:2152/134272"},"canonical_url":"https://search.ndltd.org/etd/texas/oai:repositories.lib.utexas.edu:2152/134272","repository":{"repo_id":"texas","name":"University of Texas","base_url":"https://repositories.lib.utexas.edu/server/oai/request"},"display":{"title":"On the effectiveness of large language models in writing alloy formulas","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.","abstract_html":"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.","abstract_has_math":false,"creators":["Hong, Yang, M.S. in Engineering"],"institution":"The University of Texas at Austin","degree_name":"Master of Science in Engineering","degree_level":"Masters","degree_discipline":"Electrical and Computer Engineering","degree_department":"Electrical and Computer Engineering","school":null,"contributors":[],"advisors":["Khurshid, Sarfraz"],"committee_chairs":[],"committee_members":["Garg, Vijay K. (Vijay Kumar)"],"year":2025,"date_issued":"2025-05","date_published":"2025-05","updated_at":"2026-11-20T22:00:35Z","subjects":["Declarative programming","Alloy","Specifications","SAT","Claude","LLMs","ChatGPT"],"languages":[],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/2152/134272"],"render_values":[{"text":"https://hdl.handle.net/2152/134272","href":"https://hdl.handle.net/2152/134272","code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.26153/tsw/61598","outbound_label":"DOI","outbound_source":"dc:identifier.uri","record_url":"https://doi.org/10.26153/tsw/61598","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Atexas%3Aoai%3Arepositories.lib.utexas.edu%3A2152%2F134272","prefix":"oai_dc"},"source_record":{"url":"https://repositories.lib.utexas.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Arepositories.lib.utexas.edu%3A2152%2F134272","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Khurshid, Sarfraz"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Garg, Vijay K. (Vijay Kumar)"]},{"key":"dc:contributor.department","label":"Department","values":["Electrical and Computer Engineering"]},{"key":"dc:creator","label":"Author","values":["Hong, Yang, M.S. in Engineering"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-09-16T02:41:25Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2025-05"]},{"key":"dc:date.issued","label":"Date","values":["2025-05"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["May 2025"]},{"key":"dc:date.updated","label":"Dc Date Updated","values":["2025-09-16T02:41:28Z"]},{"key":"dc:type","label":"Dc Type","values":["Thesis","text"]},{"key":"thesis:degree_college","label":"Thesis Degree College","values":["College of Engineering"]},{"key":"thesis:degree_department","label":"Department","values":["Electrical and Computer Engineering"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical and Computer Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science in Engineering"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["The University of Texas at Austin"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Declarative programming","Alloy","Specifications","SAT","Claude","LLMs","ChatGPT"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/2152/134272","https://doi.org/10.26153/tsw/61598"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["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."]},{"key":"dc:format.mimetype","label":"Dc Format Mimetype","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["On the effectiveness of large language models in writing alloy formulas"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Khurshid, Sarfraz"],"dc:contributor.committeemember":["Garg, Vijay K. (Vijay Kumar)"],"dc:contributor.department":["Electrical and Computer Engineering"],"dc:creator":["Hong, Yang, M.S. in Engineering"],"dc:date.accessioned":["2025-09-16T02:41:25Z"],"dc:date.created":["2025-05"],"dc:date.issued":["2025-05"],"dc:date.submitted":["May 2025"],"dc:date.updated":["2025-09-16T02:41:28Z"],"dc:description.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."],"dc:format.mimetype":["application/pdf"],"dc:identifier.uri":["https://hdl.handle.net/2152/134272","https://doi.org/10.26153/tsw/61598"],"dc:subject":["Declarative programming","Alloy","Specifications","SAT","Claude","LLMs","ChatGPT"],"dc:title":["On the effectiveness of large language models in writing alloy formulas"],"dc:type":["Thesis","text"],"others:access_status":["open.access"],"thesis:degree_college":["College of Engineering"],"thesis:degree_department":["Electrical and Computer Engineering"],"thesis:degree_discipline":["Electrical and Computer Engineering"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Science in Engineering"],"thesis:institution_name":["The University of Texas at Austin"]},"updated_at":"2026-11-20T22:00:35Z"}