Example of sustainability analysis - Implementation of program analysis in a compiler

Example of sustainability analysis - Implementation of program analysis in a compiler


Example sustainability analysis: Implementation of program analysis in a compiler

Implementation of program analysis in a compiler

Author: Håvard Rognebakke Krogstie

NTNU Open: Improving Andersen's Pointer Analysis in the Jlm Compiler

 

Short description

Theme: Implementation of a specific type of program analysis in a compiler with the aim of optimizing the compiled program code

Type of Thesis: Technical / theoretical

 

Abstract

Purpose of the thesis: To implement, within the compiler itself, an analysis method that enables better optimization of the compiled program code.

This is a technical and partly theoretical thesis where the main impact on sustainability will primarily concern resource usage related to the compiler and the software. Sustainability in these areas falls under what is known as “green IT.”
 

Sustainability analysis

A simple sustainability analysis was conducted in connection with the thesis. The following assumptions were made:

  • The final solution is assumed to be implemented in a widely used compiler

  • The final solution works, meaning the compiler’s analysis leads to more efficient program code

  • The compiled software is run far more often than the code is compiled, making the resource usage of compilation less significant compared to the gains from efficient program code

  • The final solution is general enough to be adopted in other compilers as well

 

The following sustainability effects were identified and represented in a sustainability diagram (see Figure 1):

 

TE1: Technical impacts, enabling:

  • The compiler with the implemented improvement performs a good analysis, resulting in more efficient compiled software

  • The compiler with the implemented improvement analyzes faster/more efficiently than the previous solution

 

These two impacts will in turn lead to effects related to the environment (shown with arrows in the diagram):

EnE1: Environmental impacts, enabling:

  • Lower resource usage related to the use of the compiler

  • Lower resource usage related to the use of the compiled software

 

As a consequence of this, effects related to the economy may follow:

EcE1: Economic impacts, enabling:

  • Increased revenue from the more efficient software

  • Economic gain from the solution being adopted in other compilers, thereby improving other types of software

 

All of the above impacts can be considered positive, shown in the diagram using green color.

SE1: Social impact, enabling:

  • The compilator leads to more effective programcode
  • It can be used in other compilators

 

The solution requires a technically challenging development task to be carried out, with various resource demands associated with it and a significant degree of unpredictability.

TI1: Technical impact, immediate:

  • Demanding development process

 

Yellow is used in the figure to indicate that this can be considered a neutral impact (neither good nor bad, or both).

However, the demands of the development work can lead to challenges for the developer in terms of time use, which is why this is included as a potential impact:

II1: Individual impact, immediate:

  • Lack of work/life balance

 

Relationships between impacts:

Immediate level; relationships:

  • TI1 → II1: Extensive time spent on a demanding development process makes it difficult to balance work and leisure.

Enabling level; relationships:

  • EnE1 → EcE1: Lower resource consumption leads to increased revenue from the software.
  • SE1 → EcE1: When it can be reused in other compilers, money is saved.
  • TE1 → EcE1: The implemented improvement makes the software more efficient, thereby requiring fewer resources.

No systemic impacts were identified in the analysis.

It is possible to go further and find other impacts that may follow from the identified ones. The analysis in the example was concluded based on an assessment of probability (in light of the assumptions) and the significance of the impacts.

It is also possible to create this in a table format:

ID Effect Level Affects +/-
TE1 The compiler analyzes faster  Enabling EcE1 +
II1

Lack of work/life balance for developer

Immediate TE1 -
EnE1 Lower resource usage related to the compiler Enabling EcE1 +
EcEn1 Lower resource usage related to the software Enabling EcE1 +
EcE1 Increased revenue from software sales Enabling   +
SE1 The solution is used in other compilers Enabling EcE1 +
TI1 Technically demanding development process Immediate II1  

Partners

Partners