About Modelling by Jan Pettersen Nytun Ui A
About Modelling by Jan Pettersen Nytun, Ui. A, page 1
When you want to communicate something to another person, what kind of principles do you use - e. g. , how to describe a unicorn? About Modelling by Jan Pettersen Nytun, Ui. A, page 2
Understanding by Analogy “all meaning is mapping-mediated, which is to say, all meaning comes from analogies. ” [1] Math terms: – A homomorphism is a map from one structure to another preserving selected structures. – Isomorphism is when there is a homomorphic mapping both ways - in a sense isomorphic structures are structurally identical. About Modelling by Jan Pettersen Nytun, Ui. A, page 3
Descriptive Models Model described. By given System E. g. physics : - the system under study is nature (which is given) - the mission is to come up with a description (model) that is so good that it can be used to predict and explain natural phenomenon. About Modelling by Jan Pettersen Nytun, Ui. A, page 4
What types of Models do we have in software engineering? About Modelling by Jan Pettersen Nytun, Ui. A, page 5
Specification (Prescriptive Model) & Descriptive Model The “specified. By role” is a specialization of the “described. By role. ” described. By given described. By specifies specified. By System In physics the system under study is nature (which is given); the mission is to come up with a description (model) that is so good that it can be used to predict and explain natural phenomenon. The specification of a software system; the implementation (system) must conform to the model. A system is a group of interacting, interrelated, or interdependent elements that form a complex whole. Person name Model 1 * Car : Person name=“Bob” : Car A Model Instance snapshot
Features of a Model A model according to Stachowiak exhibits the following features: Mapping feature A model is based on an original (there is a subject). Reduction feature A model only reflects a (relevant) selection of an original's properties. Pragmatic feature A model needs to be usable (in place of an original) with respect to some purpose. About Modelling by Jan Pettersen Nytun, Ui. A, page 7
Pragmatic Feature There is some purpose with the model. Often more cost-saving to obtain answers from a model than from the system. E. g. , use a small model of a ship to test stability instead of a full scale ship. About Modelling by Jan Pettersen Nytun, Ui. A, page 8
What is needed in the system What kind of model? Domain Model (an analysis model) Analysis/Type Model How should the system work What kind of model? Design Model Understand Refine Implementation Model Map to code Problem Domain Code / Implemented System Install About Modelling by Jan Pettersen Nytun, page 9
What is needed in the system Descriptive model Domain Model (an analysis model) Analysis/Type Model How should Prescriptive the system work models Design Model Understand Refine Implementation Model Map to code Problem Domain Code / Implemented System Install About Modelling by Jan Pettersen Nytun, page 10
Perspectives when it comes to diagrams - one possible ways to classify this • Conceptual: – The concepts of the problem domain are addressed. – Analysis class diagrams closer to the actual software solution – Platform Independent Models (PIMs). • Specification: – This perspective is typically employed under (early) design (PIM/Platform Specific Models (PSM)). – Interfaces is typically specified, but not the implementation. • Implementation: – Class diagrams reflects the classes to implement – PSMs. About Modelling by Jan Pettersen Nytun, page 11
Reality Domain Model The Domain Concepts From The Domain Person owner Car DESCRIBE AND UNDERSTAND THE MAIN CONCEPTS WITHIN THE DOMAIN It is a sort of “thinking model” About Modelling by Jan Pettersen Nytun, page 12
Domain Model High Level Conceptual Model • When you make a domain model you capture/understand the key concepts of the problem domain. • A domain model is typically visualized with class diagrams. About Modelling by Jan Pettersen Nytun, page 13
Glossary • Often there is a glossary of terms that describes the domain classes and other classes. It is important to have a common vocabulary! vocabulary E. g. , from Magic. Draw About Modelling by Jan Pettersen Nytun, page 14
Design • Deals with objects and functions that will be programmed • Some classes from the Domain Model may be used and extended with operations • Classes necessary for the implementation are added • The operations can be modeled with sequence diagrams – showing responsibility and interaction. About Modelling by Jan Pettersen Nytun, page 15
Design / Implementation Model • The design ends up with an implementation model. • Automatic or manual mapping to code • The implementation model is a full specification of the system • Some tools allows you to trace back from this model to the models on higher levels of abstraction About Modelling by Jan Pettersen Nytun, page 16
Static path Requirements Analysis and Capture Use Cases use case 1 Domain Model class X attribut 1. . Design Implementation Design level Diagrams Coding class X class Y attribut 1. . . . class X{. . }. . . method() Testing Test Cases use case 1 use case 2 Use Case Texts <x>does<y>. . Methods Sequence Diagrams obj 1 Obj 2 met 1() void func 1() {. . . }. . . Functional path use case 2
References [1] Douglas Hofstadter. I Am a Strange Loop (ISBN 0 -465 -03078 -5) (2007) About Modelling by Jan Pettersen Nytun, page 18, 14 February 2022
- Slides: 18