Certain applications, such as system design applications, may require that code be generated. For example, an engineer may need to generate executable code to run on a target system when designing an application for the target system. The engineer may generate a specification that includes assertions about how the code will perform. For example, the specification may include an assertion that an input signal for the generated code will not exceed ±1 volt. A code generator used by the engineer may perform an optimization, such as removing input voltage saturation checking, since the assertion indicates that the input voltage will remain within a certain range.
The generated code may operate on the target system as expected since the generated code was designed specifically for the target system. At some time later, the generated code may be installed on another target system, such as a newer version of the target system previously used to run the generated code. The engineer that designed the code based on certain assumptions may no longer be involved with the code, and therefore, assumptions made by the engineer and/or optimizations made by the code generator may not be available to persons working with the new target system and the generated code.
Since assumptions, optimizations and/or other features related to the generated code may not be readily known, the generated code run on the new target system may need to undergo extensive testing in order to verify that the generated code operates properly. In some situations, diagnostic information may be available for the generated code to assist with code verification. For example, a human-readable document may include information about static validations for a portion of the generated code. This static diagnostic information may be inadequate to validate the generated code since the diagnostic information may not be useable for runtime validation of the generated code (e.g., the diagnostic information may only be relevant to static behavior of the generated code).
Testing and verification in systems, such as complicated systems, can be very costly and may take many days or months to perform since operator based testing may be time consuming and static diagnostic information may be inadequate to perform complete validations of generated code. As a result, productivity may decrease and costs may increase when generated code is used on systems that can differ from a configuration of a system on which the generated code was originally designed to operate.