EPSRC logo

Details of Grant 

EPSRC Reference: EP/F052669/1
Title: Customization and Adaptation of Automatically Generated Code
Principal Investigator: Fischer, Dr B
Other Investigators:
Researcher Co-Investigators:
Project Partners:
Department: Electronics and Computer Science
Organisation: University of Southampton
Scheme: First Grant Scheme
Starts: 01 July 2008 Ends: 30 June 2011 Value (£): 297,772
EPSRC Research Topic Classifications:
Software Engineering
EPSRC Industrial Sector Classifications:
No relevance to Underpinning Sectors
Related Grants:
Panel History:
Panel DatePanel NameOutcome
24 Jan 2008 ICT Prioritisation Panel (Technology) Announced
Summary on Grant Application Form
Software development is difficult because of the many details and interdependencies that need to be taken into account in the source code. Model-based software development approaches tackle this problem by raising the level of abstraction. They use high-level models rather than low-level code during the development process and then rely on code generation as a key technology to automatically translate these models into the actual code. This speeds up development and increases productivity and reliability. However, these benefits can be fully realized only if the generated code can be used as is . Unfortunately, this is rarely the case: the output of a generator typically differs - often only slightly - from the user's actual requirements and thus needs customization.The research proposed here will solve this customization problem. Our goal is to develop systematic techniques and supporting tools that will allow application developers to customize automatically generated code efficiently and reliably, without the need to directly modify either the code generator or the generated code. Our approach is to use the concepts from the code generator's application domain as hooks at which developers can change the generated code. This frees them from the need to understand the details of unfamiliar code and also solves the problem of finding the right location for the desired changes in the first place, and thus reduces their cognitive burden. Our research answers three main questions: 1) How can we build generators that support code customization? 2) How can we integrate generated and custom code? 3) How can we guarantee that customizations are safe?For the first question, we follow two alternative approaches. In the first approach, we will allow developers to influence the code generation process on the fly , i.e., temporarily for each individual generator run. Here, developers write additional transformations (which form the core of a modern code generator) or derive customized versions of existing transformations, which are added to the transformations in the otherwise unchanged generator base. Hence, code generation and customization are interleaved, and the customized code is produced in a single step. We will support this by carefully exposing the representation of domain concepts, models, and transformations used in the generator and providing a small language for programming transformations. In the second approach, we will extend the generator to simultaneously generate the unchanged base code and a list of changes or patches that need to be applied to it, so that the customized code is produced in two steps.For integration, we will embed the modelling language into the programming language that the generator uses as its target. From this combined representation, we will extract a complete model as input to the generator. The resulting generated code and the custom code are then spliced together at the locations specified by the developers via the domain concepts as semantic hooks. The integration will be symmetric so that either generated or custom code can serve as the baseline. This will give the developers the flexibility required for customization.Since any changes to the generated code can destroy whatever assurance is provided by the code generator, it is necessary to re-establish assurance. However, we cannot simply try to show that the originally generated code and the customized version behave the same - after all, often the purpose of customization is to change the behavior. Instead, we will use logic-based program verification methods to formally prove that the customization preserves specific properties of interest, in particular safety properties. This guarantees that the customization does not inadvertently corrupt the generated code. We will build on our previous research to derive all the logical information that is necessary to complete the formal proofs.
Key Findings
This information can now be found on Gateway to Research (GtR) http://gtr.rcuk.ac.uk
Potential use in non-academic contexts
This information can now be found on Gateway to Research (GtR) http://gtr.rcuk.ac.uk
Impacts
Description This information can now be found on Gateway to Research (GtR) http://gtr.rcuk.ac.uk
Summary
Date Materialised
Sectors submitted by the Researcher
This information can now be found on Gateway to Research (GtR) http://gtr.rcuk.ac.uk
Project URL:  
Further Information:  
Organisation Website: http://www.soton.ac.uk