Superclass inference (was: termination for FDs and ATs)