MATLAB Answers

Can Polyspace prove recursion to be impossible?

Stein Heselmans 님이 질문을 제출함. 8 Dec 2017
최근 활동 Anirban 님이 답변함. 13 Dec 2018
We have a statemachine implementation in C for an embedded automotive product, using a table-approach. The table contains pointers to functions handling the transition and during actions for states. As these functions can call the table again, there is a chance on recursion (reported by another 3rd party static code analysis tool).
From the code design we 'know' it is not possible to have recursion, but we need proof for that as we're following ISO26262-6 (ASIL-C) and MISRA-2012 rules. From these norms, recursion in the implementation is not allowed.
Can polyspace bugfinder/codeprover report on the recursion of this tabular approached state machine implementation? If yes, how?

  댓글 수: 0

로그인 to comment.

답변 수: 1

Anirban 님의 답변 13 Dec 2018

Polyspace can detect use of recursion. There are many ways you can turn on recursion detection:

  댓글 수: 0

로그인 to comment.



Translated by