About gnatkr (GNAT User’s Guide for Native Platforms)

#### 3.3.5.1 About `gnatkr` ¶

GNAT requires that the file name must be derived from the unit name. The default rule is as follows:

- Take the unit name and replace all dots by hyphens.
- If such a replacement occurs in the second character position of a name, and the first character is `a`, `g`, `s`, or `i`, then replace the dot by the character `~` (tilde) instead of a hyphen.

  This exception avoids clashes with the standard names for children of System, Ada, Interfaces, and GNAT, which use the prefixes `s-`, `a-`, `i-`, and `g-`, respectively.

The `-gnatk`nn'` switch of the compiler activates a ‘krunching’ circuit that limits file names to `nn` characters (where `nn` is a decimal integer).

You can use the `gnatkr` utility to determine the krunched name for a given file when krunched to a specified maximum length.