Object-oriented simulation language UML2 SP
This project is maintained by vgurianov
Terms view on Wikipedia.
The base element of UML2 SP model is elementary act of communication.A model of elementary act of communication was presented to book [1]. The communication process consist a set of elementary acts of communication that linked between them. The simplest communication process is a dialog; therefore, its study is of great interest. Dialog is like atom of hydrogen in physical theory.
In this example we shall simulated dialogs between humans.
Dialogue is a written or spoken conversational exchange between two or more people. Dialogue is a process of mutual communication. There is a constant change in the roles of “listening-speaking”.
Replicas of dialogue are speech acts.
A typical set of parts of a conversation is given below.
Establishment of contact with the interlocutor (visual and speech). Common phrases: “Hello”, “Long time no see”, “Sorry”, etc.
For example, greeting short dialog is
– Good morning, Mr. Goldsmith. It’s been a long time since we met. How nice to see you again.
– How do you do, Mr. Brown. I’m glad to see you too. How are you?
– Not bad, thank you /Thanks, not so well.
In UML2 SP, a conceptual model is an ontology, which draw as an analysis class diagram. Model of the dialog is depicted in Fig.1.
Figure 1. The class diagram for the dialog model
Formal describe this definition is a ontology depicted in class diagram.
All objects of class have parallel threads.
We shall give definition of concepts to the ontology.
The “Component” frame define “Subject” concept. A subject is an entity that has a relationship with another entity. The subject can be is a human or a group of human. The frame has “next” slots. The slot define “receiver” concept. The receiver is a “listening” subject. The frame has getMessage() and putMessage() operation. It operations define “Send message” and “Receive message” concepts.
The “Leaf” frame define “Human” concept. Human is an interlocutor, participant of conversation.
The “Composite” frame define “Dialog space” concept and has “pl” slot.
The “Node” frame define “Greeting dialogue” concept and has “msg” slot. It is the system under study.
The Run() operation organize exchange of replicas. The algorithm of Run() operation is depicte in Fig.3.
Figure 2. The algorithm of Run() operation
The “Root” frame define “Environment” concept . It is initial and boundary conditions.
For verification, we shall consider simplest set of replicas:
memory = new DialogList;
cm = memory;
cm->value = "Good morning. How are you?.";
cm->next = new DialogList;
cm->next->value = "Not bad, thank you";
cm = memory;
The result of observation to simulation model is shown on Fig. 3.
Figure 3. Results of observation to simulation model
ClassesOfDialogProject.h, ClassesOfDialogProject.cpp
In this section considered object model of the dialogues.