Toward an efficient query processor for a deductive database system