Logic formulation and evaluation of academic constraints