Code prover polyspace_end_of_init not found

8 ビュー (過去 30 日間)
gary
gary 2025 年 4 月 1 日
コメント済み: gary 2025 年 4 月 1 日
When performing running Code Prover with "verify whole application" selected, I receive the error:
Pragma polyspace_end_of_init not found in main.
I am unable to find any documentation on this error. Can someone help resolve this issue?

採用された回答

Jack
Jack 2025 年 4 月 1 日
This error means that Code Prover expected to see a pragma indicating the end of your initialization section in main, but it wasn’t found. When verifying the whole application, Code Prover distinguishes between initialization code and the rest of your program using special pragmas like:
/* polyspace_end_of_init */
To resolve the error, add this pragma at the end of your initialization code in your main function. For example:
int main() {
// Your initialization code here
/* polyspace_end_of_init */
// The rest of your program
}
Alternatively, if you don't want to mark the end of initialization explicitly, you may adjust Code Prover settings to disable this check, but adding the pragma is the recommended solution.
Follow me so you can message me anytime with future questions. If this helps, please accept the answer and upvote it as well.
  1 件のコメント
gary
gary 2025 年 4 月 1 日
Thanks for the reply Jack. All of this makes sense.
To anyone working at Mathworks: Why is this not mentioned in any of the documentation (if it is, I couldn't find it)?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGenerate Report についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by