partial logic programming homework