he diagram represent not a single state, but a set of states in the state space. When a more precise state definition is needed, pre- and postconditions are added to transitions. Thus, there exists only one kind of state machine (FSM), but two types of state diagrams: FSM diagrams (each state symbol in the diagram represents a single resource state) and EFSM diagrams (each state symbol in the diagram represents a set of resource states). For the majority of realistic cases, EFSM diagrams are the only choice for describing complete behaviours. We will use an example for dis- cussing two techniques for constructing EFSM diagrams, see Fig. 7.43. The tech- niques are called explicit state and state class (state class is often called "hierarchical states" in other methods). State class is a common technique in other languages, while explicit states seems to be an invention of AML. As you will see, explicit states is a technique that allows you to produce state diagrams, in any form you like, from a defined state machine. The depicted state diagram in Fig. 7.43 tells the story of a man going to a party, and having the problem of selecting a suitable tie and jacket. The man has three jackets, a grey, a red and a white, and he has only two ties, a blue and a yellow. To the left in Fig. 7.43 you see all possible states, i.e. the state space. A state space is defined by a resource model, which in this case would be described as a person whose state consists of two state variables, jacket and tie, and an initial state called undressed. Note that a particular state can be defined by more than one state variable. 7.5 Behaviour Descriptions Service Resource model: Operations: Husband State::=CHOICE{Dressed,{undressed}} dressORD Dressed::=SET{Jacket,Tie} changeJacketORD Jacket::=jacket{grey,red,white changeTieORD Tie::=tie{blue,yellow} changeBothORD Husband undressORD The state space The service behaviour ({undressed} ({undressed} {grey,blue} {grey,blue} {white,yellow} {white,yellow} {grey,yellow} {grey,yellow} {red,blue} {red,