Page 57 - 《软件学报》2025年第12期
P. 57
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
2025,36(12):5438−5455 [doi: 10.13328/j.cnki.jos.007409] [CSTR: 32375.14.jos.007409] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
*
基于时序逻辑的需求文本隐含语义解析与推理
李春奕, 马 智, 武 强, 王小兵, 赵 亮
(西安电子科技大学 计算机科学与技术学院, 陕西 西安 710071)
通信作者: 王小兵, E-mail: xbwang@mail.xidian.edu.cn; 赵亮, E-mail: lzhao@xidian.edu.cn
摘 要: 时序逻辑已被广泛应用于形式化验证和机器人控制等领域, 但是对于非专家用户来说难以掌握使用. 因此,
采用自动化手段从自然语言文本中提取时序逻辑公式, 是至关重要的. 然而, 现有工作受限于需求样本稀疏和自然
语言语义模糊等因素, 导致其难以准确地识别自然语言文本中隐含的时序语义, 进而造成最终得到的时序逻辑公
式错误表达了原始自然语言的语义. 为了解决该问题, 提出一种基于小样本网络的时序逻辑语义分析方法 FSLNets-
TLSA, 它采用了数据预处理用来增强文本时序语义逻辑特征, 网络结构由编码器、归纳模块和关系模块组成, 旨
在捕捉需求文本的隐含时序逻辑语义信息, 并集成模型增强模块识别监控语义准确度. 在 3 个公开数据集 3 533 个
需求样本上与相似工具上完成实验评估, 其分析的平均准确率、召回率和 F1 值达到了 96.55%, 96.29% 和 96.42%,
验证了所提方法的有效性.
关键词: 时序逻辑; 语义分析; 形式化规约
中图法分类号: TP311
中文引用格式: 李春奕, 马智, 武强, 王小兵, 赵亮. 基于时序逻辑的需求文本隐含语义解析与推理. 软件学报, 2025, 36(12): 5438–
5455. http://www.jos.org.cn/1000-9825/7409.htm
英文引用格式: Li CY, Ma Z, Wu Q, Wang XB, Zhao L. Implicit Semantic Parsing and Reasoning of Requirement Text Based on
Temporal Logic. Ruan Jian Xue Bao/Journal of Software, 2025, 36(12): 5438–5455 (in Chinese). http://www.jos.org.cn/1000-9825/
7409.htm
Implicit Semantic Parsing and Reasoning of Requirement Text Based on Temporal Logic
LI Chun-Yi, MA Zhi, WU Qiang, WANG Xiao-Bing, ZHAO Liang
(School of Computer Science and Technology, Xidian University, Xi’an 710071, China)
Abstract: Temporal logic has been extensively applied in domains such as formal verification and robotics control, yet it remains
challenging for non-expert users to master. Therefore, the automated extraction of temporal logic formulas from natural language texts is
crucial. However, existing efforts are hindered by issues such as sparse sample availability and the ambiguity of natural language
semantics, which impede the accurate identification of implicit temporal semantics within natural language texts, thus leading to errors in
the translation of the original natural language semantics into temporal logic formulas. To address this issue, a novel method for temporal
logic semantic analysis based on a few-shot learning network, termed FSLNets-TLSA, is proposed. This method employs data
preprocessing techniques to enhance the temporal semantic logic features of the text. The network architecture consists of an encoder, an
induction module, and a relation module, which aim to capture the implicit temporal logic semantic information in the input text. In
addition, an enhancement module is incorporated to improve the accuracy of monitoring semantic recognition. The effectiveness of the
proposed method is validated through experimental evaluations conducted on three public datasets comprising a total of 3 533 samples, and
a comparison with similar tools. The analysis demonstrates an average Accuracy, Recall, and F1-score of 96.55%, 96.29%, and 96.42%,
respectively.
Key words: temporal logic (TL); semantic analysis; formal specification
* 基金项目: 陕西省重点研发计划 (2023-YBGY-229); 西安市科技项目 (22GXFW0025)
收稿时间: 2024-12-13; 修改时间: 2025-01-21; 采用时间: 2025-02-11; jos 在线出版时间: 2025-06-11
CNKI 网络首发时间: 2025-06-11

