Developing controlled natural language for formal specification patterns using AI assistants

Reading time: 5 minute
...

📝 Abstract

Using an AI assistant, we developed a method for systematically constructing controlled natural language for requirements based on formal specification patterns containing logical attributes. The method involves three stages: 1) compiling a generalized natural language requirement pattern that utilizes all attributes of the formal specification template; 2) generating, using the AI assistant, a corpus of natural language requirement patterns, reduced by partially evaluating attributes (the developed prompt utilizes the generalized template, attribute definitions, and specific formal semantics of the requirement patterns); and 3) formalizing the syntax of the controlled natural language based on an analysis of the grammatical structure of the resulting patterns. The method has been tested for event-driven temporal requirements.

💡 Analysis

Using an AI assistant, we developed a method for systematically constructing controlled natural language for requirements based on formal specification patterns containing logical attributes. The method involves three stages: 1) compiling a generalized natural language requirement pattern that utilizes all attributes of the formal specification template; 2) generating, using the AI assistant, a corpus of natural language requirement patterns, reduced by partially evaluating attributes (the developed prompt utilizes the generalized template, attribute definitions, and specific formal semantics of the requirement patterns); and 3) formalizing the syntax of the controlled natural language based on an analysis of the grammatical structure of the resulting patterns. The method has been tested for event-driven temporal requirements.

📄 Content

XXX-X-XXXX-XXXX-X/XX/ $XX.00 ©20XX IEEE Developing controlled natural language for formal specification patterns using AI assistants Natalia Garanina Cyber-Physical Systems lab Institute of Automation and Electrometry Novosibirsk, Russia natta.garanina@gmail.com Vladimir Zyubin Cyber-Physical Systems lab Institute of Automation and Electrometry Novosibirsk, Russia zyubin@iae.nsk.su Igor Anureev Cyber-Physical Systems lab Institute of Automation and Electrometry Novosibirsk, Russia anureev@gmail.com

Abstract — Using an AI assistant, we developed a method for systematically constructing controlled natural language for requirements based on formal specification patterns containing logical attributes. The method involves three stages: 1) compiling a generalized natural language requirement pattern that utilizes all attributes of the formal specification template; 2) generating, using the AI assistant, a corpus of natural language requirement patterns, reduced by partially evaluating attributes (the developed prompt utilizes the generalized template, attribute definitions, and specific formal semantics of the requirement patterns); and 3) formalizing the syntax of the controlled natural language based on an analysis of the grammatical structure of the resulting patterns. The method has been tested for event- driven temporal requirements. Keywords—controlled natural language, requirements, formal semantics, AI assistant, patterns I. INTRODUCTION Developing a controlled natural language (CNL) for specifying event-temporal requirements is a pressing research challenge in software requirements engineering. In today’s world, where computer systems are becoming increasingly important in industries ranging from finance and healthcare to transportation and industrial automation, ensuring accurate and understandable specification of system events and their temporal characteristics plays a critical role. According to [1], the majority of errors in software development occur during the requirements specification stage, as engineers, analysts, and other stakeholders misunderstand the requirements. Any error in the initial requirements means the need for subsequent correction, which takes time and requires additional costs [2,3]. We developed a method for systematically constructing controlled natural language requirements using an AI assistant for specifying requirements based on formal specification patterns containing logical attributes. The method includes three stages: 1) composing a generalized requirement pattern in natural language that utilizes all attributes of the formal specification pattern; 2) generating, using an AI assistant, a corpus of requirement patterns in natural language, reduced by partially evaluating attributes (the developed prompt uses the generalized pattern, evaluating attributes, and specific formal semantics of requirement patterns); 3) formalizing the syntax of the resulting controlled natural language based on the analysis of the grammatical structure of the obtained patterns. We tested the proposed method on the event-temporal requirements language EDTL [4]. Our method is suitable for patterns whose interpretation in natural language depends on constant attribute values that simplify the formula. The resulting language has formal semantics by design, unlike other methods where a requirements language is first developed and then its formal semantics is defined, such as EARS [5] and Rimay [6]. Requirements languages that already have formal semantics are also known, where several logical formulas are associated with natural language expressions, but such languages are rather limited and unexpressive [7, 8]. In other cases, such as SysReq [9], the requirements language is expressive, but its formal semantics is difficult to express and non-compact, and, as a result, difficult to verify. Thus, the development of a controlled natural language can be carried out in various ways: by constructing it following formal semantics, or, conversely, by constructing it based on the needs (not always well formalized) of domain engineers, and then matching logical formulas with the resulting NL constructs. Currently, there are expressive CNLs with complex computable semantics (SysReq [9], BraceAssertion [10], PROPAS [11]), or inexpressive ones with simple semantics [7, 8, 12-15]. The requirements specification format for which we propose the construction of CNL assumes three concise notations: tabular (logical values of requirement attributes), formal (requirement semantic formula), and linguistic (natural language phrase). These notations are compact and simultaneously accessible, while ensuring sufficient expressiveness of requirements through the diversity of attribute value combinations. In addition to the EDTL we developed, the SUP requirements representation format developed by the German compan

This content is AI-processed based on ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut