DocumentCode
130824
Title
Source code pattern as anchored abstract syntax tree
Author
Nakayama, Keisuke ; Sakai, Eko
Author_Institution
Inst. for Math. & Comput. Sci., Tsuda Coll., Kodaira, Japan
fYear
2014
fDate
27-29 June 2014
Firstpage
170
Lastpage
173
Abstract
For a software engineer, well-organized source code conveys the intention of the authors, as if it were an informal specification. An experienced engineer often grasps the “pseudo” meaning of source code first by identifying semantic chunks of various granularities in it, then by weaving them into a hypothetically consistent semantics. We call the specific part in source code that realizes a semantic chunk a code pattern. Tool support for locating already defined code pattern would help engineer´s understanding, but it has been practically difficult. One reason is that a code pattern may appear as a lot of slightly different variations. This becomes an obstacle to define a code pattern. In this paper, a framework for an implicit representation of a code pattern is presented. In the framework, a code pattern is defined by an enumeration of instances which is tagged either “positive” of “negative” by a human. From these sets, the system incrementally infers a hypothetical explicit (syntactic) definition of the code pattern. Each instance is represented as an anchored AST (abstract syntax tree. An anchored AST is an AST with a tuple of AST nodes of interest.
Keywords
programming language semantics; software tools; source code (software); anchored AST; anchored abstract syntax tree; hypothetically consistent semantics; source code pattern hypothetical explicit definition; source code pattern representation; source code pattern syntactic definition; tool support; Abstracts; Decision trees; Java; Prototypes; Semantics; Syntactics; Vectors; reverse engineering; search by example; source code search;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering and Service Science (ICSESS), 2014 5th IEEE International Conference on
Conference_Location
Beijing
ISSN
2327-0586
Print_ISBN
978-1-4799-3278-8
Type
conf
DOI
10.1109/ICSESS.2014.6933538
Filename
6933538
Link To Document