/**
 * Second class in Halting Problem proof.
 *   @author Dave Reed
 *   @version 4/1/18
 */
public class HP2 {
    // Halts if sourceFile does not halt on itself; otherwise, loops forever.
    public static void reverseSelfie(String sourceFile) {
        if (HP1.haltsOn(sourceFile, sourceFile)) {
            while (true) { 
              System.out.println("infinite loop");
            }
        }
        System.out.println("terminates");
    }
}
