Automatic dependency analysis is a useful addition to a system like CM, our
compilation manager for Standard ML of New Jersey. It relieves the program
mer From the tedious and error-prone task of having to specify compilation
dependencies hy hand and thereby makes its usage more user friendly. But de
pendency analysis is not easy, as the general problem for Standard ML is NP
-complete. Therefore, CM has to impose certain restrictions oil the program
ming language to recover tractability. We prove the NP-completeness result,
discuss the restrictions on ML that are used by CMI and provide the result
ing analysis algorithms.