Programming-by-example(PBE) is a technique that automatically generates computer programs based on input and output (I/O) examples. Currently, one of the popular methods commonly used to synthesize programs efficiently is to inspire search algorithms with predictions from deep neural networks. Unfortunately, existing heuristic search algorithms have a vast search space and low search efficiency. To overcome this problem, we regard the I/O example as a state and propose a new PS method, called Contextual State Pattern Determination-Based Heuristic Program Synthesis Algorithm. The key idea is to apply a deep neural network to judgment on the states to determine whether the patterns of the example states are realizable or non-realizable, and then eliminate the non-realizable states during the search process, and iteratively generate the target program with the realizable states. Compared with traditional PS methods, the search algorithm that incorporates state pattern determination can generate programs that satisfy the I/O examples in a faster way step by step. Furthermore, we evaluate the method, the baseline method, and other PS systems under the same implementation premise. The experimental results show that the method has some advantages over existing methods in terms of success rate and synthesis time.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Contextual State Pattern Determination-Based Heuristic Program Synthesis

  • Hao Pan,
  • Quansheng Dou,
  • Huixian Wang,
  • Shun Zhang

摘要

Programming-by-example(PBE) is a technique that automatically generates computer programs based on input and output (I/O) examples. Currently, one of the popular methods commonly used to synthesize programs efficiently is to inspire search algorithms with predictions from deep neural networks. Unfortunately, existing heuristic search algorithms have a vast search space and low search efficiency. To overcome this problem, we regard the I/O example as a state and propose a new PS method, called Contextual State Pattern Determination-Based Heuristic Program Synthesis Algorithm. The key idea is to apply a deep neural network to judgment on the states to determine whether the patterns of the example states are realizable or non-realizable, and then eliminate the non-realizable states during the search process, and iteratively generate the target program with the realizable states. Compared with traditional PS methods, the search algorithm that incorporates state pattern determination can generate programs that satisfy the I/O examples in a faster way step by step. Furthermore, we evaluate the method, the baseline method, and other PS systems under the same implementation premise. The experimental results show that the method has some advantages over existing methods in terms of success rate and synthesis time.