The Polyspace code verification section is split into two parts, a header file and an implementation file. These two files form part of the Matlab solution.
The Polyspace program itself works as follows. To run the solution, you will need the “” file, and an OPLS function. In general, the function name is either “polysphereVerify”polysphereVerifyPkg”, depending on which version of Matlab you’re using.
The Polyspace Verification program does many things. Firstly, it makes sure that you don’t use extraneous operator expressions. This is actually part of the test-case. You can set a check to make sure that your expression doesn’t overstep the defined limits of Polyspace. You can do this by defining a static value for the testPoint variable.
The definition should look like this:
int testPointIndex = Index (const Point (0, width / 2), const Point (width / 2, height / 2));
The testPointIndex variable is used by the Polyspace Verification function to keep track of how far the Polyspace Test point goes beyond the defined range. We want to keep a track of how far the point goes, so that we can prevent any computation that makes a lot of computations.
Secondly, it verifies the Polyspace Code Verification. You’ll find this in the test-case.
The polysphereVerify module lets you specify parameters to pass to the Polyspace Solution. These parameters are specified in the parameter declaration.
On the other hand, the polysphereCodeVerification parameter lets you specify information about the software that you’re using for the Polyspace Code Verification. If you want to use MATLAB for the verification, then the parameter would be “MATLAB”. If you want to use the external language, such as Python, then you’d set “python”.
Finally, the program solution file will let you set things like the number of tests that will be run. The default is one, which is a good choice.