0% found this document useful (0 votes)
6 views

Compiler Assignment

The document outlines a scenario where a software developer is tasked with optimizing a pathfinding algorithm for real-time embedded systems in autonomous vehicles due to slow compiler-generated code. It details the need for global optimization techniques such as loop-invariant code motion and constant propagation, and includes an evaluation of trade-offs related to execution speed, memory usage, and code maintainability. Recommendations are to be provided based on a thorough analysis of these optimizations in the context of real-time system constraints.

Uploaded by

Walter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Compiler Assignment

The document outlines a scenario where a software developer is tasked with optimizing a pathfinding algorithm for real-time embedded systems in autonomous vehicles due to slow compiler-generated code. It details the need for global optimization techniques such as loop-invariant code motion and constant propagation, and includes an evaluation of trade-offs related to execution speed, memory usage, and code maintainability. Recommendations are to be provided based on a thorough analysis of these optimizations in the context of real-time system constraints.

Uploaded by

Walter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Scenario:

You are working as a software developer for a company that produces real-time embedded systems for
autonomous vehicles. The company is facing a critical challenge: the current compiler's generated code
for pathfinding algorithms is too slow, resulting in delays during real-time navigation. You are tasked
with improving the system's performance by applying global optimization techniques in the compiler.

The code provided for the pathfinding algorithm contains multiple redundant calculations, dead code,
and inefficient register usage. Your team suggests using global optimizations such as loop-invariant code
motion, constant propagation, and register allocation to optimize the compiled code.

Task:

1. Synthesis (Create):

o Design a step-by-step plan to optimize the pathfinding algorithm using at least two
global optimization techniques. Justify your choice of techniques based on the
characteristics of the algorithm.

o Implement pseudo-code or annotate the provided code sample to demonstrate how the
chosen optimizations would be applied.

2. Evaluation (Judge):

o Critically evaluate the potential trade-offs of your chosen optimization techniques in


terms of execution speed, memory usage, and code maintainability.

o Provide a well-reasoned recommendation to your team about whether these


optimizations are suitable for real-time systems, considering the constraints of
embedded environments.

Rubric for Evaluating the Practical Question

1. Identification of Optimization Techniques:

o Exemplary (5 points): The student accurately identifies and explains two or more global
optimization techniques. The explanation demonstrates a deep understanding of the
techniques and their relevance to the provided scenario.

o Proficient (4 points): The student correctly identifies two techniques and provides a
clear explanation of their use, though there may be minor gaps in understanding.

o Developing (3 points): The student identifies one or two techniques, but the reasoning
is unclear or partially incorrect.

o Beginning (2 points): The student misidentifies the optimization techniques or provides


vague explanations that do not clearly relate to the scenario.

o Incomplete (1 point): The student fails to identify any relevant techniques.


2. Implementation of Optimization:

o Exemplary (5 points): The student provides a detailed and correct implementation or


pseudo-code, with clear annotations showing how the optimizations improve efficiency.

o Proficient (4 points): The student provides a reasonably detailed implementation or


pseudo-code with minor errors that do not significantly impact the solution.

o Developing (3 points): The student provides a partial or unclear implementation with


significant gaps in demonstrating the optimization process.

o Beginning (2 points): The student provides a vague or incorrect implementation that


does not clearly relate to the scenario.

o Incomplete (1 point): The student provides no implementation or pseudo-code.

3. Evaluation of Trade-offs:

o Exemplary (5 points): The student thoroughly evaluates the trade-offs of the


optimization techniques, offering insightful analysis on execution speed, memory usage,
and code maintainability. The evaluation is well-linked to the real-time system
constraints of the scenario.

o Proficient (4 points): The student evaluates the trade-offs with some depth, addressing
most key points but may miss one constraint or lack detail in one area.

o Developing (3 points): The student discusses trade-offs superficially, omitting important


aspects or failing to connect them clearly to the scenario.

o Beginning (2 points): The student provides minimal evaluation, with little relevance to
the scenario or significant gaps in addressing major trade-offs.

o Incomplete (1 point): The student provides no meaningful evaluation of trade-offs.

4. Recommendations:

o Exemplary (5 points): The student provides a well-justified and practical


recommendation based on a balanced analysis of trade-offs and constraints relevant to
the scenario.

o Proficient (4 points): The student offers a reasonable recommendation supported by


analysis, but it may miss some considerations or have minor logical gaps.

o Developing (3 points): The student offers a recommendation with weak justification or


significant oversights in the analysis.

o Beginning (2 points): The student provides a vague or impractical recommendation that


is not clearly tied to the scenario or lacks supporting evidence.

o Incomplete (1 point): The student provides no recommendation.

5. Clarity and Presentation:


o Exemplary (5 points): The response is exceptionally well-organized, with clear and
concise explanations and a logical flow of ideas throughout.

o Proficient (4 points): The response is well-organized and mostly clear, with minor issues
in clarity or logical progression.

o Developing (3 points): The response lacks clarity or organization, with several unclear
explanations or poorly explained concepts.

o Beginning (2 points): The response is disorganized, with unclear explanations and little
logical flow.

o Incomplete (1 point): The response is incomplete or incoherent, making it difficult to


follow or understand.

You might also like