Microsoft Corporation
Autosynthesized sublanguage snippet presentation
Last updated:
Abstract:
In a computer program, sublanguage code snippets implement regular expressions, pattern matching, print formatting, component selection, and other operations, using sublanguage syntax and semantics different from the source code in which snippets are embedded. Writing snippets that give desired execution results has been difficult and interfered with software development workflow. But sublanguage snippet presentation functionality in an enhanced development tool automatically detects source code locations suitable for snippets, receives snippet execution result examples from a developer, submits the examples to synthesis-by-example technology, gets autosynthesized snippets that give those results, and displays snippet insertion candidates with guidance. A snippet selected by the developer replaces the example(s) in the source code, improving developer productivity and program execution accuracy with respect to documented test cases. Examples may be autogenerated, including representative examples or disambiguating examples. Examples may be preserved in comments. Performance criteria for sublanguage snippet presentation are also described.
Utility
28 Apr 2020
27 Jul 2021