The grammar of the house and of the city. Theoretical approaches for generating project