MATLAB: Polyspace verification fails during compilation stage while verifying Ada code

Why does Ada code verification using Polyspace fail during the compilation phase with the below error message:
_Verifying _pst_main
Verifying gnat_oslib
gnat_oslib.adb, line 5 (column 19): Error:
"Normalize_Pathname" not declared(1) in "OS_Lib"
Warning: Failed compilation of gnat_oslib_

Best Answer

The above error occurs because Gnat_oslib specs, which is included in
%POLYSPACE_ADA%\Verifier\ada83include\g-os_lib.ads
($POLYSPACE_ADA/Verifier/ada83include/g-os_lib.ads for Unix), does not contain a declaration for the procedure _Normalize_Pathname_
 
To work around the issue:
  1. Copy g-os_lib.ads, which includes a declaration of the procedure _Normalize_Pathname_, from adaincludes of your compiler.
  2. Add g-os_lib.ads to your source folder.
  3. Run the verification again.