发明名称 GENERALIZATION AND/OR SPECIALIZATION OF CODE FRAGMENTS
摘要 Generalization and/or specialization of code fragments is described, for example, as part of a tool for software developers. In an embodiment, a developer inserts natural language expressing a programming task into code he or she is developing in an integrated development environment; a program synthesizer obtains relevant (possibly non-compiling) code fragments for the task, merges those together to form a snippet, specializes the snippet for the context of the code and inserts the specialized snippet into the code. For example, a pair of code fragments are obtained from a search engine and are merged by discarding statements which are not common to each of the pair. In examples, pairs of code fragments are selected using search engine ranks, user input, or frequency. In embodiments, placeholders replace variable names in the merged fragments. An example takes a syntax tree of the code being developed and uses that to specialize snippets.
申请公布号 US2014013299(A1) 申请公布日期 2014.01.09
申请号 US201213542975 申请日期 2012.07.06
申请人 BORDEAUX LUCAS JULIEN;GULWANI SUMIT;HAMADI YOUSSEF;WEI YI;MICROSOFT CORPORATION 发明人 BORDEAUX LUCAS JULIEN;GULWANI SUMIT;HAMADI YOUSSEF;WEI YI
分类号 G06F9/44 主分类号 G06F9/44
代理机构 代理人
主权项
地址