Automatically constructing a program based on given specifications has been studied for decades. Despite the advances in the field of Program Synthesis, the current approaches suffer from a twofold issue: highly relyi...
详细信息
ISBN:
(纸本)9781665403375
Automatically constructing a program based on given specifications has been studied for decades. Despite the advances in the field of Program Synthesis, the current approaches suffer from a twofold issue: highly relying on the programmer for providing the specifications, and leaving the task of incorporating the synthesized code in an existing code base to program developers. Due to its program-wide effects, synthesizing an architectural tactic and reusing it in a program is even more challenging. Architectural tactics need to be synthesized based on the context of different locations of the program, broken down to smaller pieces, and added to corresponding locations in the code. Moreover, each piece needs to establish correct data- and control-dependencies to its surrounding environment as well as to the other synthesized pieces. This is an error-prone and challenging task, especially for novice program developers. In this paper, we introduce a novel program synthesis approach that synthesizes and adds architectural tactics to an existing code base.
Integrated development environments (IDE) play an important role in supporting developers during program comprehension and completion. Many of these supportive features focus on low-level programming and debugging act...
详细信息
ISBN:
(纸本)9781665414036
Integrated development environments (IDE) play an important role in supporting developers during program comprehension and completion. Many of these supportive features focus on low-level programming and debugging activities. Unfortunately, there is less support in understanding and implementing architectural concerns in the form of patterns, tactics and/or other concerns. In this paper we present ArCode, a tool designed as a plugin for a popular IDE, IntelliJ IDEA. ArCode is able to learn correct ways of using frameworks' api to implement architectural concerns such as Authentication and Authorization from two sources, sample programs that practice the framework, and the byte code of that framework. Analyzing a program under development, this tool is able to find deviations from correct implementation and provide fix recommendations alongside with graphical demonstrations to better communicate the recommendations with the developers. We showcase how programmers can benefit from ArCode by providing an example of api misuse detection and api recommendation for a popular Java framework, Java Authentication and Authorization (JAAS) security framework.
Reusing existing library components is essential for reducing the cost of software development and maintenance. When library components evolve to accommodate new feature requests, to fix bugs, or to meet new standards...
详细信息
Reusing existing library components is essential for reducing the cost of software development and maintenance. When library components evolve to accommodate new feature requests, to fix bugs, or to meet new standards, the clients of software libraries often need to make corresponding changes to correctly use the updated libraries. Existing apiusage adaptation techniques support simple adaptation such as replacing the target of calls to a deprecated api, however, cannot handle complex adaptations such as creating a new object to be passed to a different api method, or adding an exception handling logic that surrounds the updated api method calls. This paper presents LIBSYNC that guides developers in adapting apiusage code by learning complex apiusage adaptation patterns from other clients that already migrated to a new library version (and also from the apiusages within the library's test code). LIBSYNC uses several graph-based techniques (1) to identify changes to api declarations by comparing two library versions, (2) to extract associated apiusage skeletons before and after library migration, and (3) to compare the extracted apiusage skeletons to recover apiusage adaptation patterns. Using the learned adaptation patterns, LIBSYNC recommends the locations and edit operations for adapting apiusages. The evaluation of LIBSYNC on real-world software systems shows that it is highly correct and useful with a precision of 100% and a recall of 91%.
Software designers and developers are increasingly relying on application frameworks as first-class design concepts. They instantiate the services that frameworks provide to implement various architectural tactics and...
详细信息
ISBN:
(纸本)9781728162607
Software designers and developers are increasingly relying on application frameworks as first-class design concepts. They instantiate the services that frameworks provide to implement various architectural tactics and patterns. One of the challenges in employing frameworks for such tasks is the difficulty of learning and correctly using the apis of the frameworks. This paper introduces a learning-based approach called ARCODE to help novice programmers correctly use frameworks' apis to implement architectural tactics and patterns. ARCODE has several novel components: a graph-based approach for learning specification of a framework from a limited number of training software, a program analysis algorithm to eliminate erroneous training data, and a recommender module to help programmers use apis correctly and identify api misuses in their program. We evaluated our technique across two popular frameworks: JAAS security framework used for authentication and authorization tactic and Java RMI framework used to enable remote method invocation between client and server and other object oriented patterns. Our results demonstrate (i) the feasibility of using ARCODE to learn the specification of a framework;(ii) ARCODE generates accurate recommendations for finding the next api call to implement an architectural tactic/pattern based on the context of the programmer's code;(iii) it accurately detects api misuses in the code that implements a tactic/pattern and provides fix recommendations. We also demonstrate that ArCode outperforms two famous techniques, MAPO and GrouMiner, on api recommendation and misuse detection tasks.
暂无评论