其他检查
标准库函数使用、指针转换和
assert
语句的检查Polyspace® Code Prover™ 可以检查特定于某些 C/C++ 库的运行时错误,例如:
使用标准库数学函数时出现域错误。
使用 AUTOSAR 运行时环境或 RTE 函数时超出设计范围。
Polyspace 结果
未实现的 AUTOSAR 可运行实体 | Function implementing AUTOSAR runnable is not found |
正确性判定条件 | Mismatch occurs during pointer cast or function pointer use |
无效的 AUTOSAR 可运行实体实现结果 | Return value or output arguments violate AUTOSAR specifications |
无效的 AUTOSAR 运行时环境函数使用 | RTE function argument violates AUTOSAR specifications |
无效的标准库例程使用 | Standard library function is called with invalid arguments |
不符合 AUTOSAR 规范 | RTE API function is used with arguments that violate the AUTOSAR standard specification (自 R2021a 起) |
用户断言 | assert statement fails |
模型引用的输入/输出超出指定范围 | Input or output of generated code from model reference outside of range specified in model |
主题
- Review and Fix Correctness Condition Checks
Find the root cause of a function pointer misuse, incorrect array conversion or variable values outside specified constraints.
- Review and Fix Invalid Use of Standard Library Routine Checks
Investigate why the arguments in the current call to the standard library routine are invalid.
- Review and Fix User Assertion Checks
Investigate why the condition in an
assert
statement fails. - Review Polyspace Results on AUTOSAR Code
Interpret Polyspace results that highlight violation of ARXML data constraints.
- Find Relations Between Variables in Code
Determine if the variables in any operation are related from some previous operation.