Improving efficiency of recursive theory learning