Software architecture and design are usually modeled and represented by informal diagrams, such as architecture diagrams and UML diagrams. While these graphic notations are easy to understand and are convenient to use, they are not amendable to automated verification and transformation. This paper provides graph grammars for architecture and UML class diagrams. ammars enable a high level of abstraction for the general organization of a class of software architectures, and form a basis for various analysis and transformations. In this approach, software verification is performed through a syntax analyzer. Architecture transformation is achieved by applying predefined transformation rules.