通信学报 ›› 2023, Vol. 44 ›› Issue (11): 249-259.doi: 10.11959/j.issn.1000-436x.2023203

• 学术论文 • 上一篇    

PSR-SQUARES:基于程序空间约简器的SQL逆向合成系统

窦全胜1,2, 张顺1, 潘浩1, 王荟贤1, 唐焕玲1   

  1. 1 山东工商学院信息与电子工程学院,山东 烟台 264005
    2 喀什大学计算机科学与技术学院,新疆 喀什 844006
  • 修回日期:2023-10-13 出版日期:2023-11-01 发布日期:2023-11-01
  • 作者简介:窦全胜(1971− ),男,黑龙江大庆人,博士,山东工商学院教授,主要研究方向为机器学习、数据挖掘、知识工程与知识处理、智能理论与方法等
    张顺(1992− ),男,山东潍坊人,山东工商学院硕士生,主要研究方向为人工智能、程序合成等
    潘浩(1999− ),男,山东泰安人,山东工商学院硕士生,主要研究方向为人工智能、深度学习、程序合成算法等
    王荟贤(1996− ),男,山东烟台人,山东工商学院硕士生,主要研究方向为人工智能、程序合成、机器学习等
    唐焕玲(1970− ),女,山东烟台人,博士,山东工商学院教授,主要研究方向为机器学习、人工智能、数据挖掘等
  • 基金资助:
    国家自然科学基金资助项目(61976124);国家自然科学基金资助项目(61976125);新疆维吾尔自治区自然科学基金面上项目(2022D01A237);新疆维吾尔自治区自然科学基金面上项目(2022D01A238)

PSR-SQUARES: SQL reverse synthesis system based on program space reducer

Quansheng DOU1,2, Shun ZHANG1, Hao PAN1, Huixian WANG1, Huanling TANG1   

  1. 1 School of Information and Electronic Engineering, Shandong Technology and Business University, Yantai 264005, China
    2 School of Computer Science and Technology, Kashi University, Kashi 844006, China
  • Revised:2023-10-13 Online:2023-11-01 Published:2023-11-01
  • Supported by:
    The National Natural Science Foundation of China(61976124);The National Natural Science Foundation of China(61976125);The Natural Science Foundation of Xinjiang Uygur Autonomous Region(2022D01A237);The Natural Science Foundation of Xinjiang Uygur Autonomous Region(2022D01A238)

摘要:

针对SQUARES程序空间增长过快,导致程序合成效率偏低的问题,在SQUARES的基础上,增加了以深度神经网络为核心的程序空间约简器,将给定的<被查询表,查询结果>示例表示成二维张量,作为深度神经网络的输入,网络的输出是关于目标 SQL 语句合成规则的相关性标记向量。约简器根据神经网络的输出结果,采用末N位淘汰策略,删除与目标SQL语句相关性弱的合成规则,以减少候选SQL语句的生成和验证,提升系统合成效率。对约简器中深度神经网络的结构设计、训练样本集的生成方法和网络训练过程进行了详细描述。同时将PSR-SQUARES与当前有代表性SQL逆向合成系统进行实验对比,实验结果表明,PSR-SQUARES的综合性能不同程度地优于其他合成系统,平均合成时间由SQUARES的251 s降低至130 s,目标程序合成成功率由80%提升至89%。

关键词: 程序合成, SQL逆向合成, SQUARES, 程序空间约简器, 领域特定语言

Abstract:

In order to address the issue of rapid growth of program space in SQUARES, which led to low efficiency in program synthesis, a program space reducer based on deep neural network (DNN) was introduced into the SQUARES framework.A given <Queried tables, Query result> pair was represented as a 2D tensor which was used as input for a DNN.And the output of the DNN was the relevance vector of the target SQL statement synthesis rules.Based on the output of the DNN, the last N rules with weak correlation to the target SQL statement were eliminated, thereby shrinking the program search space and improving the system synthesis efficiency.The architecture of DNN, the method of generating training datasets, and the training process of DNN were described in detail.Furthermore, experimental comparisons between PSR-SQUARES and other representative SQL reverse synthesis systems were conducted.The results show that the overall performance of PSR-SQUARES is superior to other synthesis systems to varying degrees, with the average synthesis time reduced from 251 s in SQUARES to 130 s and the target program synthesis success rate increased from 80% to 89%.

Key words: program synthesis, SQL reverse synthesis, SQUARES, program space reducer, domain-specific language

中图分类号: 

No Suggested Reading articles found!