BAE Systems® asked Rapita Systems to identify opportunities for worst-case execution time reduction in state-of-the-art software which powers one of BAE’s most famous planes – the Hawk®.
One of the world’s most successful advanced training aircraft, outperforming and outselling all other aircraft in its class, over 900 Hawks are in operational service, or have been ordered, by 19 countries world-wide.
A key sub-system of the aircraft is the Hawk Mission Computer and Operational Flight Program software. Consisting of hundreds of thousands of lines of Ada source code executing on a PowerPC® (MPC7410) as 25 separate partitions, the software provides navigation and other decision-making support.
The challenge for Rapita was to use its worst-case execution time expertise to optimize this code and reduce the overall execution time of the OFP Software by at least 10%.
Putting the RapiTime worst-case execution time analysis tool to work
Phase 1 of the project focused on 4 partitions that make up approximately 25% of the schedule. RapiTime (part of Rapita Verification Suite) was used to identify opportunities for reducing the overall execution time of code in these partitions.
Highlighting worst-case hotspots
Unlike conventional code profiling techniques, which identify the lines of code that execute the most on average, RapiTime identifies worst-case hotspots in Ada subprograms and lines of source code from the point of view of their contribution to the overall worst-case execution time.
Finding candidates for optimization
By combining static analysis of the program structure with timing trace information generated via extensive testing, RapiTime was able to provide information about the contribution of every subprogram to the overall worst-case execution time.
What optimization achieved
Code constructs found to be contributing heavily to the worst-case execution time were:
- Stripped of code responsible for redundant copies of large data structures
- Given rewritten bit unpacking code, enabling the compiler to produce much more efficient object code (in a subprogram that was called over 700 times on the worst-case path)
- Provided with replacement case statements using look-up tables (called over 450 times on the worst-case path)
- Identified the causes of timing problems with less than 10% of the effort of previous approaches
- Provided convincing evidence that timing requirements had been met
- Accurately identified worst-case hotspots, enabling a 23% reduction in the worst-case execution time of the analyzed partitions
BAE Systems Chairman’s award winners
For this work, Rapita Systems won a BAE Systems Chairman’s Award for Innovation in the Transferring Best Practice category.
The Bronze Award, made jointly to Rapita Systems and BAE Systems Brough, was presented at the prestigious Chairman’s Awards dinner.
The award was for deployment of RapiTime worst-case execution time analysis technology on the Hawk Advanced Jet Trainer project.
The Rapita Systems and Hawk team successfully demonstrated application of this ground breaking technology to analyze components of the new Open Architecture Mission Computer.
“We are delighted with the schedule reductions achieved in phase 1. The integration team are now looking at how RapiTime can be used as an integral part of the software development process for future Hawk developments.”
Software Engineering Manager
BAE Systems Brough