A Java program for logical resolution