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.
翻译:利用AI助手,我们开发了一种基于包含逻辑属性的形式化规约模式,系统化构建需求受控自然语言的方法。该方法包含三个阶段:1)编译一个利用形式化规约模板所有属性的广义自然语言需求模式;2)使用AI助手生成一个自然语言需求模式语料库,该语料库通过对属性进行部分求值而缩减(所开发的提示词利用了广义模板、属性定义以及需求模式的具体形式语义);以及3)基于对生成模式的语法结构分析,形式化受控自然语言的句法。该方法已在事件驱动的时序需求上进行了测试。