"Autofac" is a 1955 science fiction short story by American writer Philip K. Dick that features one of the earliest treatments of self-replicating machines. It appeared originally in Galaxy Science Fiction of November 1955, and was reprinted in several collections, including The Variable Man published in 1957, and Robots, Androids, and Mechanical Oddities published in 1984.