Object Code Verification Solution for DO-178B


Object Code Verification

So what is object code verification? The relevant section of the DO-178B standard (6.4.4.2 Structural Coverage Analysis) describes the requirement as follows:

"The structural coverage analysis may be performed on the source code, unless the software is Level A and the compiler generates object code that is not directly traceable to source code statements. Then, additional verification should be performed on the object code to establish the correctness of such generated code sequences. A compiler-generated array bound check in the object code is an example of object code that is not directly traceable to the source code."

In a nutshell, object code verification is concerned with how much the control flow structure of the compiler generated object code differs from that of the application source code from which it was derived.

OCV Slide Image

Such differences may occur for a number of reasons, e.g. compiler interpretation, optimisation, etc. Given, however, that traditional structural coverage techniques are applied at the source code level whereas it is actually the object code that executes on the processor, differences in control flow structure between the two can make for significant gaps in the testing process.

The demands of DO-178B are such that developers of applications that are subject to the standard are required to implement object code verification facilities for those elements of the application that have a Level-A (safety-critical) classification. While this is often a sub-set of the application as a whole, it can nevertheless represent a significant amount of testing effort and hence require considerable resources in terms of time and money. As such, opportunities to implement automated, compiler-independent processes can help to reduce overall development costs by considerable margins.

LDRA’s Object Code Verification Solution

LDRA has recognised and responded to the increasing requirement for object code verification solutions from differing industry sectors and can provide a complete structural coverage analysis solution for both source and object code from unit to system and integration levels.

High and Low level examples of LDRA Dynamic Analysis Coverage Report

The solution utilises the combination of both high and object level (assembler) source code variants of the LDRA tool suite with the object level tool variant being determined by the target processor that the application is required to run on. A typical example might see C/C++ and TMS320C25x Assembler copies of the LDRA tool suite teamed together. However, this and many other high level/assembler language combinations are supported to provide the following coverage metrics:

  • Statement
  • Branch
  • Test path
  • Procedure/Function Call
  • Boolean Expression Coverage

– Branch Decision Condition
– Branch Condition Combination
– Modified Condition/Decision (DO-178B)*
(*Language dependent)

Object Code Verification at the Unit Level

In providing an automated unit level solution for object code verification with TBrun, LDRA has taken tool support for this type of analysis a significant step further than other tool vendors.

In brief the ‘Object-box Mode’, as the LDRA unit test object code verification facility is known, enables users to create test cases for structural coverage of high-level source and apply these exact same test cases to the structural coverage of the corresponding object code.

Key to this facility is the sophisticated driver program that is automatically created by TBrun. This driver encapsulates the entire test environment, defining, running and monitoring the test cases through initial test verification and then subsequent regression analysis. In ‘Object-box Mode’ this driver may be linked with either the high-level source unit or the associated object code. In so doing users can ensure that a uniform test process may be applied and compared in order to determine any discrepancies / deficiencies.

High and Low level examples of LDRA flow graphs

If structural coverage discrepancies / deficiencies are identified at the object level users are then presented with an opportunity to define additional test cases to close any gaps in the test process. The obvious advantage of being able to identify and apply corrective action at such an early development stage is that it is much easier and cheaper. It also significantly increases the quality of the code and the overall test process with the latter reaping benefits at the later stages of integration and system testing and then onward in the form of reduced failure rates/maintenance costs when the application is in the field.

While the code is still under development, together with satisfying the necessary object code verification requirements in a highly automated and cost-effective manner, developers can also benefit from the considerable additional test feedback that is provided by the LDRA tool suite in the form of sophisticated Code Review and Design Review elements. The results of these analysis facilities can be fed back to the development team with the possibility that further code and design deficiencies may be identified and rectified, further enhancing the quality of the application as a whole.

Summary

There is no doubt that object code verification presents a significant challenge to those software development projects that are required to undertake it.

With the right tools and facilities, however, the scope of these challenges may be greatly reduced thus enabling developers to realise the full potential and benefits that such analysis may bring in terms of increased code quality and reliability.

The object code verification facilities provided by LDRA represent the most sophisticated, cost-effective solution in the marketplace today.

"The integration of LDRA’s dynamic analysis testing tool with the higher level language tool ensures LMCO has an "out of the box" solution which is used by LMCO and the sub-contractors of the JSF project."

Mike Cottrill, Senior Embedded Software Engineer, JSF SW Collaborative Environments, Lockheed Martin

Availability

The LDRA solution for object code verification is available for:

  • Intel Assemblers
  • Freescale Assemblers
  • Texas Instruments Assemblers

For more information

For more information concerning support for your specific language dialect please complete the LDRA Information Request Form or email .