7.3. Crunching Method

The initial file name is determined by the name of the unit that the file contains. The name is formed by taking the full expanded name of the unit and replacing the separating dots with hyphens and using lowercase for all letter, except that a hyphen in the second character position is replaced by a tilde if the first character is a, i, g, or s. The extension is .ads for a specification and .adb for a body. Crunching does not affect the extension, but the file name is shorted to the specified length by following these rules:

Of course no file shortening algorithm can guarantee uniqueness over all possible unit names, and if file name crunching is used then it is your responsibility to ensure that no name clashes occur. The utility program gnatkr is supplied for conveniently determining the crunched name of a file.