Modelling Parametric Contracts and the State Space of Composite Components by Graph Grammars Ralf H. Reussner 1 , Jens Happe 1 , and Annegret Habel 2 1 Software Engineering Group (Fax ++49 441 9722 502) 2 Formal Languages Group (Fax ++ 49 441 798 2965) University of Oldenburg, Germany [ralf.reussner|jens.happe|annegret.habel]@informatik.uni-oldenburg.de Abstract. Modeling the dependencies between provided and required services within a software component is necessary for several reasons, such as automated component adaptation and architectural dependency analysis. Parametric con- tracts for software components specify such dependencies and were successfully used for automated protocol adaptation and quality of service prediction. In this paper, a novel model for parametric contracts based on graph grammars is pre- sented and a first definition of the compositionality of parametric contracts is given. Compared to the previously used finite state machine based formalism, the graph grammar formalism allows a more elegant formulation of parametric contract applications and considerably simpler implementations. 1 Introduction Specifications should not be a means by themselves, but should have beneficial ap- plications (besides of being a specification of something). Applications of software component specifications and software architecture specifications include automated test case generation, architectural dependency analysis [18] and component adaptation [14]. In any of these applications, additional information on a component (besides their interfaces) is beneficial which, on a first glance, seems to contradict the black-box use of components. However, the conflict between the need of additional information and black-box component (re-)use does not exist, as long as two conditions are fulfilled: In- formation on the component (beyond the interfaces) does not (a) have to be understood by human users, and (b) expose the intellectual property of the component creator. In addition, it is beneficial, if information on the component can be easily specified or even generated out of the component’s code. Parametric contracts [14, 15] support automated component protocol adaptation, quality of service prediction [16] and architectural dependency analysis by giving addi- tional information on the inner structure of the component. In more detail, parametric contracts request so-called service effect specifications for specifying inner-component dependencies between provided and required services. These dependencies are simple to model as lists in case of signature-list interfaces (which required services are needed by a provided service). In case of protocol modelling interfaces things are more compli- cated, as one needs to specify sets of call sequences (which call sequences are needed