This text documents the design and implementation of Aquarius Prolog, a high-performance logic programming system. The book details the internals of an optimizing Prolog compiler. The system is available without charge from the University of Southern California and runs under BSD Unix.