Homeworks in Intelligent CAD done in Prolog