A Logic for Trial and Error Classifiers