Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

DO Qualification Kit

Polyspace Code Prover


Tool Operational Requirements
R2015b, September 2015

How to Contact MathWorks


Latest news:

www.mathworks.com

Sales and services:

www.mathworks.com/sales_and_services

User community:

www.mathworks.com/matlabcentral

Technical support:

www.mathworks.com/support/contact_us

Phone:

508-647-7000

The MathWorks, Inc.


3 Apple Hill Drive
Natick, MA 01760-2098
DO Qualification Kit: Polyspace Code Prover Tool Operational Requirements

COPYRIGHT 20132015 by The MathWorks, Inc.


The software described in this document is furnished under a license agreement. The software may be used or copied only under
the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written
consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the
federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees
that this software or documentation qualifies as commercial computer software or commercial computer software documentation
as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and
conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification,
reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or
other entity acquiring for or through the federal government)and shall supersede any conflicting contractual terms or conditions.
If this License fails to meet the governments needs or is inconsistent in any respect with federal procurement law, the
government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.

Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a
list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective
holders.

Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more
information.

Revision History
September 2013
March 2014
October 2014
March 2015
September 2015

New for Version 2.2 (Applies to Release 2013b)


Revised for Version 2.3 (Applies to Release 2014a)
Revised for Version 2.4 (Applies to Release 2014b)
Revised for Version 2.5 (Applies to Release 2015a)
Revised for DO Qualification Kit Version 3.0 (Applies to Release 2015b); Renamed sections of
Polyspace Code Prover Theoretical Foundation to Polyspace Code Prover Tool Operational
Requirements

Contents
1 Introduction ...................................................................................................................................... 1-1
2 High-Level Polyspace Code Prover Output Requirements .............................................................. 2-1
Requirement HLR-1-CP. (Soundness) ......................................................................................... 2-2
Requirement HLR-2-CP. (Run-Time Errors Yield Checks) ........................................................ 2-2
Requirement HLR-3. (Check Colors Are Sound) ........................................................................ 2-2
Requirement HLR-4. (Call Graphs) ............................................................................................. 2-2
Requirement HLR-5. (Call Graphs Are Sound) ........................................................................... 2-2
Requirement HLR-6. (Data Dictionaries) .................................................................................... 2-2
Requirement HLR-7. (Data Accesses Referenced in Dictionaries Are Sound) ........................... 2-3
Requirement HLR-8-CP. (Shared Statuses Referenced in Dictionaries Are Sound) ................... 2-3
Requirement HLR-12. (Compliance with Coding Standard) ....................................................... 2-3
Requirement HLR-13. (Coding Metrics) ..................................................................................... 2-3
3 High-Level Polyspace Code Prover Output Requirements Independence ................................... 3-1
Requirement HLR-10. (Component Independence) ..................................................................... 3-2
Requirement HLR-11. (Behavior Independence)......................................................................... 3-2
4 References ........................................................................................................................................ 4-1
4.1 Reference Documents.............................................................................................................. 4-2

vi

1 Introduction
This document comprises the Tool Operational Requirements (reference DO-330 Section
10.3.1) for the following Polyspace Code Prover verification tool.
The Tool Operational Requirements are defined as High-Level Requirements (HLRs) in this
document. The Tool Requirements are defined in the Polyspace Code Prover Tool Requirement
document. To comply with DO-330, Polyspace Code Prover Tool Requirements trace to HLRs.
The following table summarizes the documents in which the Polyspace Code Prover Tool
Operational Requirements and Polyspace Tool Requirements are defined. The table also
provides the name of the requirement traceability matrix.
Verification
Tool

Tool Operational
Requirements

Tool Requirements

Traceability

Polyspace
Code Prover

Defined as HLRs in
Polyspace Code Prover
Tool Operational
Requirements (this
document)

Defined as ORs and


LSRs in Polyspace
Code Prover Tool
Requirements

Polyspace Code Prover


Requirement Traceability Matrix
qualkitdo_codeprover_HLR
_OR_LSR_trace.xlsx

The theoretical foundation for the Polyspace Code Prover Tool Operational Requirements is
described in the Polyspace Code Prover Theoretical Foundation. The Polyspace Code Prover
Tool Operational Requirements (this document) describes high-level requirements for the
outputs of Polyspace Code Prover for ANSI C and ISO C++, as well as the independence of
Polyspace Code Prover outputs with respect to tools to which it is coupled. These requirements
apply to the core of Polyspace Code Prover and do not apply to its peripherals, such as user
interfaces that involve launching or exploitation interfaces.

1-2

2 High-Level Polyspace Code


Prover Output Requirements

Requirement HLR-1-CP. (Soundness)


The outputs generated by Polyspace Code Prover shall be irrefutable (sound) with respect to the
run-time error, call trees and data dictionaries, as specified by the applicable language standard.
This applies to programs that meet applicable language standards at compile-time: programs that
are syntactically correct and for which the context conditions prescribed by the standard are
satisfied (which includes type checking). Language-specific requirements and/or restrictions
may apply. The semantics of the corresponding programming language may be parameterized
by options passed to the Polyspace Code Prover software that describe the target processor and
the target environment, by options that change specific parts of the semantic model, or by
options that favor either analysis time or precision.

Requirement HLR-2-CP. (Run-Time Errors Yield Checks)


Polyspace Code Prover shall give a predictive color C#(k) for every operation k that can possibly
raise a run-time error, which, depending on the language standard, can cause an exception, an
undefined behavior, a processor halt, or other unspecified conditions (including nondeterminism
due to the use of uninitialized data). This is specified further by a language-specific requirement.
Besides check colors, Polyspace Code Prover may also generate additional information that can
help the exploitation of check colors, including the indication of nonterminating constructs,
information about the dynamic ranges of values of variables, or other unspecified information.
This information is outside the scope of this document.

Requirement HLR-3. (Check Colors Are Sound)


Each predicted color C#(k) output by Polyspace Code Prover shall be sound. The predicted color
must be admissible according to Definition 7.

Requirement HLR-4. (Call Graphs)


Polyspace Code Prover shall output call graphs, which associate each source subprogram with
the source location of each statement that can dynamically issue a call to the subprogram.

Requirement HLR-5. (Call Graphs Are Sound)


Polyspace Code Prover calls that can occur in the semantic model (dynamically) shall be
referenced in the call graph.

Requirement HLR-6. (Data Dictionaries)


Polyspace Code Prover shall output data dictionaries containing, for each global variable, the
source location of each read or write access; its shared or nonshared status; and, optionally, its
dynamic value range, if it is a scalar.

2-2

Requirement HLR-7. (Data Accesses Referenced in


Dictionaries Are Sound)
If a read or write access can be dynamically issued to a global variable, then Polyspace Code
Prover shall put the global variable in the data dictionary.

Requirement HLR-8-CP. (Shared Statuses Referenced in


Dictionaries Are Sound)
Polyspace Code Prover shall reference each variable V not satisfying the Bernstein1 condition
for noninterference (if V can be accessed by two tasks, threads, or interrupt routines with one
access being a write access) as shared in the data dictionary.

Requirement HLR-12. (Compliance with Coding Standard)


Polyspace Code Prover shall output coding standard violations. For each violation, Polyspace
Code Prover shall provide the location and the type of violation. This is applicable for known
standards (MISRA, or JSF) and for rules defined by users.

Requirement HLR-13. (Coding Metrics)


Polyspace Code Prover shall output coding metrics at project, files, and function level (number
of files, number of function, cyclomatic number).

A. BERNSTEIN, Analysis of Programs for Parallel Processing, IEEE Trans. on Computers, EC 15: 5, 757-763, 1966.

2-3

2-4

3 High-Level Polyspace Code


Prover Output Requirements
Independence

Requirement HLR-10. (Component Independence)


Polyspace Code Prover core components shall be specified, developed, and tested independently
from MathWorks code generators. As a result, core components developed by one team are not
reused by another team.

Requirement HLR-11. (Behavior Independence)


Using another tool (for example, compiler, IDE, or code generator) with Polyspace Code Prover
shall not change Polyspace Code Prover behavior or output, as stated in the HLRs. Manual
semantic and automatic behavioral changes shall be accessible from Polyspace Code Prover by
user-level options.

3-2

4 References

4.1 Reference Documents


Floating point arithmetic standard IEEE 748
Programming languages C. International standard ISO/EIC 9899: 1990 (E)
Programming languages C. International standard ISO/EIC 9899: 1999 (E)
Programming languages C++. International standard ISO/EIC 14882: 1998 (E)

4-2

You might also like