MATLAB: Does Polyspace for Ada cite missing spec dependencies and then fail to compile

adaadbadsbodydependenciesdependencydependsexternalincludePolyspace Client for AdaproductsspecSpecification

Why does Polyspace for Ada cite missing spec dependencies and then fail to compile?
Polyspace is failing to compile, saying that one or more code files depend on some spec files. All of my spec files are in Project/Source, so why am I still getting this error?

Best Answer

1) Any spec files that the Project/Source files depend on should be located in the Project/Include folder. This includes not just your spec files, but also all external dependencies on spec files that you do not own or want to analyze.
2) Make sure that you are using a compatible compiler for your code base. This setting can be accessed in the Project's "Configuration" tab in the "Target & Compiler" pane. For example, the ".1.ada" and ".2.ada" filename extensions for the spec and body files respectively suggest using the "-rational" compiler.
3) Make sure your filename extensions are reflected in the "Target & Compiler" spec file extension setting. to ".ads" and ".adb". The default value of "*.ad[as]" expects ".ads" or ".ada" spec files and ".adb" body files. If you are using ".1.ada" spec files and ".2.ada" body files, both will be interpreted as spec files, which is not what you want.
4) Try removing the spec files that are causing the error, so that they will not be analyzed. Once you get your compilation working, you can add these again one by one as needed.