Grant: Discovery Grants Program - Individual
Simon Fraser University
$36,000.00
Automating Data Representation Changes
FY 2023-24
Summary
Refactoring, the process of changing code structure while maintaining the code behavior, is a common part of the software development process. Recent studies have found that 40.6% of surveyed programmers perform code refactoring almost every day. One important kind of program refactoring comes as representation changes. Programmers often change the underlying representations of their data, but once they perform that change their code is left in a bad state. The code that interacts with the underlying data operates on the old data representation, causing type errors in typed code and runtime errors in untyped code. This code must be refactored to operate on the new data representation. Unfortunately, this process must currently is tedious, is error-prone, and must be done manually. To change the underlying data representation, a user must identify usages of the data storage, must change the means of processing the storage, and must change the methods of updating the stored data. These changes may need to happen in many locations, the changes may require a large amount of potentially rote code restructuring, and it may be complex to ensure the equivalence of the code before and after restructuring. Furthermore, no refactoring tools can currently automate this form of code restructuring, because the current state-of-the-art in code refactoring focuses on changes that can be expressed purely syntactically, whereas automating representation changes requires a semantic understanding of the underlying code. The long-term goal of this research program is to enable safe and efficient automation of the process of refactoring code to reflect changes in underlying data representation. This goal can be achieved by addressing the following 4 primary challenges. 1. How can we create a automatically generate code that transforms data in the old data representation to the new, and back from the new data representation to the old? 2. How can we integrate the data transformation scripts with the existing codebase to seamlessly operate over the new data type? 3. How can we ensure the equivalence of the code before and after the transformations? 4. How can we extend this approach to operate over untyped code?
Program
Discovery Grants Program - Individual
Recipient
Location
British Columbia, Canada
Recipient Type
Academia
Type
Grant
Source
NSERC's Awards Data
As published
Application id
RGPIN-2023-04171
Name nom
Miltner, Anders
Department département
Computing Science
Organization id
5
Institution établissement
Simon Fraser University
Province en
British Columbia
Province fr
Colombie-Britannique
Country en
CANADA
Country fr
CANADA
Fiscal year exercice financier
2023
Competition year année de concours
2023
Award amount
36000
Program id
RGPIN
Program name en
Discovery Grants Program - Individual
Program name fr
Programme de subventions à la découverte - individuelles
Group en
DISCOVERY RESEARCH
Group fr
RECHERCHE AXÉE SUR LA DÉCOUVERTE
Committee code
1507
Committee name en
Computer Science
Committee name fr
Sciences informatiques
Area of application code
1207
Area of application group en
Advancement of knowledge
Area of application group fr
Avancement des connaissances
Area of application en
Information, computer and communication technologies
Area of application fr
Technologie de l'information, des ordinateurs et des réseaux de communications
Research subject code
9999
Research subject group en
Not available
Research subject group fr
Not available
Research subject en
Non disponible
Research subject fr
Non disponible
Application title
Automating Data Representation Changes
Keyword
Automated Refactoring; Domain-Specific Languages; Program Synthesis; Program Transformations; Type Systems
Application summary
Refactoring, the process of changing code structure while maintaining the code behavior, is a common part of the software development process. Recent studies have found that 40.6% of surveyed programmers perform code refactoring almost every day. One important kind of program refactoring comes as representation changes. Programmers often change the underlying representations of their data, but once they perform that change their code is left in a bad state. The code that interacts with the underlying data operates on the old data representation, causing type errors in typed code and runtime errors in untyped code. This code must be refactored to operate on the new data representation. Unfortunately, this process must currently is tedious, is error-prone, and must be done manually. To change the underlying data representation, a user must identify usages of the data storage, must change the means of processing the storage, and must change the methods of updating the stored data. These changes may need to happen in many locations, the changes may require a large amount of potentially rote code restructuring, and it may be complex to ensure the equivalence of the code before and after restructuring. Furthermore, no refactoring tools can currently automate this form of code restructuring, because the current state-of-the-art in code refactoring focuses on changes that can be expressed purely syntactically, whereas automating representation changes requires a semantic understanding of the underlying code. The long-term goal of this research program is to enable safe and efficient automation of the process of refactoring code to reflect changes in underlying data representation. This goal can be achieved by addressing the following 4 primary challenges. 1. How can we create a automatically generate code that transforms data in the old data representation to the new, and back from the new data representation to the old? 2. How can we integrate the data transformation scripts with the existing codebase to seamlessly operate over the new data type? 3. How can we ensure the equivalence of the code before and after the transformations? 4. How can we extend this approach to operate over untyped code?