Pith. sign in

REVIEW 3 cited by

On the Effectiveness of Large Language Models in Writing Alloy Formulas

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 2502.15441 v1 pith:ELYCGVEV submitted 2025-02-21 cs.SE cs.AIcs.FLcs.PL

On the Effectiveness of Large Language Models in Writing Alloy Formulas

classification cs.SE cs.AIcs.FLcs.PL
keywords alloyformulasllmslanguagegivenspecificationsemploynatural
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
read the original 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.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 3 Pith papers

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

  1. Verified LLM-Driven Synthesis for Concept Design

    cs.SE 2026-07 conditional novelty 7.0

    A formal reaction semantics plus an LLM+Alloy CEGIS loop synthesizes and bounded-verifies coordination rules for Concept Design, with scenarios beating natural-language prompts for intent recovery.

  2. Event-B Agent: Towards LLM Agent for Formal Model Synthesis and Repair

    cs.SE 2026-05 unverdicted novelty 7.0

    Event-B Agent is an LLM agent that synthesizes, refines, and repairs Event-B formal models from natural language requirements via iterative verification feedback loops.

  3. LM2Alloy: Investigating LLM-Generated Formal Specifications for Automated Test Derivation in Production Software

    cs.SE 2026-07 conditional novelty 6.0

    An LLM-generated Alloy specification derived from documentation caught a duplicate-name bug in Flipper that direct LLM test generation missed.