This paper presents a new technique for the solution of CAD problems. The technique is illustrated on an architectural example. The designing knowledge is represented in the form of axioms described in the language of mathematical logic. The calculi of logic which manipulate these axioms can be used to model designing processes. If Horn formulas are used the description of the technical problem can be considered as a program written in PROLOG. A new architectural application of PROLOG is introduced, in the form of the design of a multistorey living-house. The first program generates different versions of ground-plans according to the special needs of the customer. During the design of the house those versions are selected which meet the functional requirements, the dimensions and the environment data of the building.