Code representation generation method and device

The invention discloses a code representation generation method and device, and the method comprises the steps: carrying out the program analysis of a source code, and obtaining a code program analysis result of the source code; at least one code structure unit is determined from the code program an...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: DING YIWEI, HU ENRUI, WANG QIRUI, XU PENG, LI YUHAO
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses a code representation generation method and device, and the method comprises the steps: carrying out the program analysis of a source code, and obtaining a code program analysis result of the source code; at least one code structure unit is determined from the code program analysis result. Wherein the code structure unit refers to a code snippet with complete semantics and structure. And inputting the at least one code structure unit and the code program analysis result into a code representation model, so that the code representation model can generate a code representation for any code snippet with complete semantics and structure in the source code. 一种代码表示的生成方法及装置,该方法包括:对源代码进行程序分析,得到源代码的代码程序分析结果;从代码程序分析结果中确定至少一个代码结构单元。其中,代码结构单元是指具有完整语义和结构的代码片段。将至少一个代码结构单元和代码程序分析结果输入代码表示模型,使得代码表示模型能够为源代码中的任意具有完整语义和结构的代码片段产生代码表示。