Towards an Agentic LLM-based Approach to Requirement Formalization from Unstructured Specifications
Alberto Tagliaferro, Bruno Guindani, Livia Lestingi, Matteo Rossi · 2026
Read Towards an Agentic LLM-based Approach to Requirement Formalization from Unstructured Specifications by Alberto Tagliaferro, Bruno Guindani, Livia Lestingi, Matteo Rossi (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-18228.txt.
Introduction
Tagliaferro, Guindani, Lestingi, and Rossi build an agent-based pipeline that turns plain-language safety requirements into formal properties fit for verification. Current language-model tools check syntax but miss whether formal output truly matches the plain intent. Their system pulls out needs, filters them for fit with a target formalism, and turns them into properties. Tests in three settings reach 77.8 percent accuracy for output that matches in both form and meaning.
Catalog record
| CREATOR | Alberto Tagliaferro, Bruno Guindani, Livia Lestingi, Matteo Rossi |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 36699 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.18228
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Towards an Agentic LLM-based Approach to Requirement Formalization from Unstructured Specifications Alberto Tagliaferro, Bruno Guindani, Livia Lestingi, Matteo Rossi Abstract Early-stage specifications of safety-critical systems are typically expressed in natural language, making it difficult to derive formal properties suitable for verification and needed to guarantee safety. While recent llm ( llm )–based approaches can generate formal artifacts from text, they mainly focus on syntactic correctness and do not ensure semantic alignment between informal requirements and formally verifiable properties. We propose an agentic methodology that automatically extracts verification-ready properties from unstructured specifications. The modular pipeline combines requirement extraction, compatibility filtering with respect to a target formalism, and translation into formal properties. Experimental results across three scenarios show that the pipeline generates syntactically and semantically aligned formal properties with a 77.8 % 77.8\% accuracy. By explicitly accounting for modeling and verification constraints, the approach is a paving step towards exploiting ai ( ai ) to bridge the gap between informal descriptions and semantically meaningful formal verification. Keywords Formal Property Elicitation, Requirement Formalization, AI for Requirements Engineering, AI for Formal Methods, Large Language Models, Agentic Workflow 0.1 Introduction When engineering software-intensive safety-critical systems, providing sound guarantees that the delivered product satisfies set requirements is of pivotal importance. For example, for service robots requiring close interaction with humans to complete their tasks, it is crucial to ensure that their behavior complies with both safety and societal norms. Model-driven approaches in combination with formal verification techniques are traditionally adopted to guarantee that the final software-controlled system will satisfy the desired properties. To this end, a formal specification of the system under analysis, amenable to verification, and of the properties to be satisfied must be available. However, at an early stage, the software development process is usually carried out by means of informal specifications, such as natural language descriptions of the hri ( hri ) scenarios that the robotic agent must be able to tackle, and eliciting verifiable requirements from free text remains an open challenge. The existing body of work on requirement elicitation widely explores the issue of extrapolating meaningful requirements from unstructured text with an automated process [ 22 , 17 ] . On the other hand, the goal of automatically formalizing requirements out of natural language descriptions has only recently been pursued with the advent of generative ai and, specifically, llm . However, recent work mostly focuses on approaches that ensure the syntactic correctness of the ai -generated artifacts. Syntactic correctness can be checked automatically by validating models against a grammar, compiling them, or verifying well-formedness constraints defined by modeling guidelines. While these checks ensure structural consistency, they do not guarantee that the generated requirements also semantically align with the intended system’s behavior. Verifying semantic correctness is substantially more difficult: properties must reflect the intent expressed in natural language specifications, be expressible in a formal language, and be verifiable on the resulting model. This paper addresses this challenge by proposing a methodology that automatically extracts a set of formal properties from an informal specification, with the goal of operationalizing requirements that are not only syntactically but also semantically correct with respect to the initial specification. The approach explicitly accounts for the characteristics and constraints of the target model, ensuring that the generated properties are meaningful and verifiable. Thanks to the modular structure of the methodology, it is possible to trace and inspect each stage of the property elicitation process. The presented methodology proposes an agentic approach based on llm to elicit verification-ready properties from unstructured textual specifications. The approach is agentic as it coordinates multiple llm with specialized roles and integrates verification tools within the pipeline, allowing candidate properties to be extracted, assessed, and translated while being validated against the constraints of the target verification framework. Specifically, the pipeline envisages the following stages: (i) an llm extracts candidate natural language requirements from informal specifications, (ii) candidate requirements are then filtered by a judge llm to exclude the ones corresponding to properties that are not compatible with or cannot be expressed in the target formal language, (iii) eligible candidates are translated into properties expressed in the target formalism, and, (iv) finally, the syntactic correctness of the generated properties is programmatically checked through the target verification tool while a second judge llm evaluates the semantic alignment with the original specification. While the approach is domain-agnostic, our preliminary evaluation focuses on informal specifications in the hri domain. Each specification is translated into a liras ( liras ) specification, a dsl ( dsl ) designed for describing multi-agent interaction patterns [ 23 , 24 ] , which automatically generates a sha ( sha ) model compatible with the U PPAAL tool. 1 1 1 www.uppaal.org Consequently, the target formalism for this work is the query language provided by U PPAAL in support of smc ( smc ), but as mentioned, the proposed pipeline can be applied to different domains, formalisms, and verification tools. Experiments are performed with the gemini-3.1-pro-preview model. 2 2 2 The code and artifacts for this project are publicly available at doi.org/10.5281/zenodo.19023550 . Results show that: (i) in the extraction phase, the model achieves an 81.8\% combined rate of exact and partial semantic matches for the generated requirements; (ii) in the verifiability classification stage, it has an overall accuracy of 88.7\% and a recall of 94.2\% , successfully filtering out unverifiable constraints; and (iii) in the final formal translation step, 95.8\% of the generated queries are syntactically correct, with a 77.8\% effective semantic translation accuracy when accounting for valid logical equivalences and alternative formulations. This paper is structured as follows: Section 0.2 surveys related work, Section 0.3 outlines preliminary concepts, Section 0.4 describes the proposed methodology, Section 0.5 presents experimental results, and Section 0.6 concludes and presents future research directions. 0.2 Related work This section surveys related work on requirement formalization from informal specifications and the use of llm in requirements engineering, positioning our work with respect to the state-of-the-art. Requirement Formalization from Informal Specifications. [ 4 ] [ 4 ] survey (semi-)automated approaches for generating formal specifications from nl ( nl ) requirements, including nl , ontology-based domain modeling, and llm , and discuss key challenges identified across the literature. These include semantic ambiguity, the absence of ground-truth datasets, limited tool interoperability, traceability across artifacts, and concerns regarding explainability and user trust. Recent work increasingly leverages llm for direct translation into temporal logics. For instance, [ 16 ] [ 16 ] generate tl ( tl ) specifications from software documentation using both end-to-end and two-step pipelines, reporting issues of specification oversimplification and fabrication. [ 9 ] [ 9 ] introduce nl2spec, an open-source framework that translates unstructured nl requirements into tl statements via llm , while [ 30 ] [ 30 ] focus specifically on automated conversion into ctl ( ctl ). Several approaches introduce intermediate representations to structure the translation process. In [ 19 ] [ 19 ] , llm map informal requirements to a JSON-like language, OnionL, which is subsequently translated into ltl ( ltl ) through rule-based techniques. Similarly, [ 14 ] [ 14 ] convert nl requirements into Property Specification Patterns (PSP), an intermediate formalism enabling translation into multiple target logics. Beyond temporal logic generation, [ 26 ] [