Reference number : GC-2017-Q1-02805, amendment number : , agreement type : G, recipient legal name : Kahl, Wolfram (McMaster University), recipient country : CA, recipient province : nan, recipient city : Ontario, recipient postal code : nan, program name english : Discovery Grants Program - Individual, program name french : Programme de subventions à la découverte - individuelles, program purpose english : Important parts of the supporting infrastructure for optimising code generators, in particular in compilers, consist of analyses of graphs , especially control-flow graphs and data-flow graphs. In addition, many of the optimisations enabled by these analyses are usefully understood as graph transformations. 
 
Interestingly, the program transformation literature almost exclusively concentrates on transformation of (higher-order) abstract syntax trees . This corresponds to the usual approach in a compiler context to first parse the given programs into abstract syntax trees, and then extract from these the necessary information to construct the graphs to be used for data-flow and control-flow analyses, while still considering the abstract syntax trees as the internal representation of the program. 
 
However, many of the transformations that are used for code optimisation, in particular in the back-ends of compilers, act on patterns that can usefully be thought of as graph patterns, and the resulting transformations are frequently explained in the literature as graph transformations applied to control-flow graphs and data-flow graphs. 
 
In this research programme, I aim to create the theoretical justifications for control-flow graph transformation and data-flow graph transformations by linking the theories of control-flow and data-flow semantics with appropriate theories of graph transformation and build on these foundations a mechanised framework for nested code graph transformation. 
 
The goal of this framework is to be the first representative of a new class of mechanised environments in which experts can design special-purpose optimisation passes in a graph-based formalism that captures the intuitive graph-based descriptions of optimisation passes as they are customary in the compiler literature. However, while the graph-based descriptions in the literature are technically completely informal, the envisaged mechanised system will support not only capturing the design itself, but also proving the correctness of these optimisations at a level that is conceptually close to the design, and will finally also automatically generate correct-by-construction implementations of these optimisation passes., program purpose french : Important parts of the supporting infrastructure for optimising code generators, in particular in compilers, consist of analyses of graphs , especially control-flow graphs and data-flow graphs. In addition, many of the optimisations enabled by these analyses are usefully understood as graph transformations. 
 
Interestingly, the program transformation literature almost exclusively concentrates on transformation of (higher-order) abstract syntax trees . This corresponds to the usual approach in a compiler context to first parse the given programs into abstract syntax trees, and then extract from these the necessary information to construct the graphs to be used for data-flow and control-flow analyses, while still considering the abstract syntax trees as the internal representation of the program. 
 
However, many of the transformations that are used for code optimisation, in particular in the back-ends of compilers, act on patterns that can usefully be thought of as graph patterns, and the resulting transformations are frequently explained in the literature as graph transformations applied to control-flow graphs and data-flow graphs. 
 
In this research programme, I aim to create the theoretical justifications for control-flow graph transformation and data-flow graph transformations by linking the theories of control-flow and data-flow semantics with appropriate theories of graph transformation and build on these foundations a mechanised framework for nested code graph transformation. 
 
The goal of this framework is to be the first representative of a new class of mechanised environments in which experts can design special-purpose optimisation passes in a graph-based formalism that captures the intuitive graph-based descriptions of optimisation passes as they are customary in the compiler literature. However, while the graph-based descriptions in the literature are technically completely informal, the envisaged mechanised system will support not only capturing the design itself, but also proving the correctness of these optimisations at a level that is conceptually close to the design, and will finally also automatically generate correct-by-construction implementations of these optimisation passes., agreement title english : Towards  “Mouldable Code” as a Better Approach to Synthesis of Efficient and Correct Software, agreement title french : Towards  “Mouldable Code” as a Better Approach to Synthesis of Efficient and Correct Software, agreement number : RGPIN, agreement value : 100000.0, agreement start date : 2017-05-10, agreement end date : nan, description english : nan, description french : nan, expected results english : nan, expected results french : nan, additional information english : Grant or Award spanning more than one fiscal year. (2017-2018 to 2022-2023), additional information french : Subvention ou bourse octroyée s'appliquant à plus d'un exercice financier. (2017-2018 à 2022-2023), owner organization : nserc-crsng, owner organization title : Natural Sciences and Engineering Research Council of Canada | Conseil de recherches en sciences naturelles et en génie du Canada