Learning Program Component Order

07/21/2017
by   Steven P. Reiss, et al.
0

Successful programs are written to be maintained. One aspect to this is that programmers order the components in the code files in a particular way. This is part of programming style. While the conventions for ordering are sometimes given as part of a style guideline, such guidelines are often incomplete and programmers tend to have their own more comprehensive orderings in mind. This paper defines a model for ordering program components and shows how this model can be learned from sample code. Such a model is a useful tool for a programming environment in that it can be used to find the proper location for inserting new components or for reordering files to better meet the needs of the programmer. The model is designed so that it can be fine- tuned by the programmer. The learning framework is evaluated both by looking at code with known style guidelines and by testing whether it inserts existing components into a file correctly.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/12/2023

Assessing the Impact of File Ordering Strategies on Code Review Process

Popular modern code review tools (e.g. Gerrit and GitHub) sort files in ...
research
09/13/2022

Exploring Code Style Transfer with Neural Networks

Style is a significant component of natural language text, reflecting a ...
research
05/28/2021

Learning to Extend Program Graphs to Work-in-Progress Code

Source code spends most of its time in a broken or incomplete state duri...
research
12/03/2019

PyTorch: An Imperative Style, High-Performance Deep Learning Library

Deep learning frameworks have often focused on either usability or speed...
research
02/08/2022

Automated Instantiation of Control Flow Tracing Exercises

One of the first steps in learning how to program is reading and tracing...
research
06/14/2018

o-glasses: Visualizing x86 Code from Binary Using a 1d-CNN

Malicious document files used in targeted attacks often contain a small ...
research
12/07/2018

CSS Minification via Constraint Solving (Technical Report)

Minification is a widely-accepted technique which aims at reducing the s...

Please sign up or login with your details

Forgot password? Click here to reset