a prolog interpreter rough implementation