180 likes | 207 Views
Chapter 1 (Part 2). Introduction to Requirements Modeling. What is a System?.
E N D
Chapter 1 (Part 2) Introduction to Requirements Modeling SEG2106 - Chapter 1
What is a System? • A system is part of real world that a person or group of persons during some time interval and for some purpose choose to regard as a whole, consisting of interrelated components, each component characterized by properties that are selected as being relevant to the purpose. • A system is a purposeful collection of interrelated components that work together to achieve some objective. [Braek] SEG2106 - Chapter 1
What is a System (2) • A system is part of the real world. • What constitutes a system is a matter of definition. • Each component of a system may also be regarded as a system. • A system is not just any unordered collection of components. • A system has purpose. SEG2106 - Chapter 1
System Hierarchy SEG2106 - Chapter 1
A Simple Intruder Alarm System SEG2106 - Chapter 1
System Description • Two purposes • To describe the functional behavior so that it can be fully understood • To describe the realization so that the system may be produced • Two aspects • (static) structure • (dynamic) behavior SEG2106 - Chapter 1
Behavior • The behavior of a system is the development of states and state transitions generated by actions of the system during the time interval in which it is studied. • Behavior is a dynamic development over time. • Actually occurring in real world. • Approximation: behavior consists of actions that change state (value) of variables. SEG2106 - Chapter 1
Structure • The structure of a system is the aspects of the system which stay invariant during the time interval in which it is studied. • Structure is the way things hold together for some time. SEG2106 - Chapter 1
Techniques to Manage Complexity Abstraction: • To ignore some aspects of a phenomenon in order to describe (and understand) others more clearly. • Opposite of concrete or physical. • The abstractions should be clear and precise, lead to efficient implementation, and support the continuing development and reuse. SEG2106 - Chapter 1
Aggregation and Partitioning • All non-trivial systems are composed from components. • The process of lumping components together to form a whole is called aggregation. • The opposite process of decomposing a whole into parts is called partitioning. SEG2106 - Chapter 1
Projection • In projections we look at the system from different angles. • A projection is a description of a system as it is observed at subset of its interfaces. • Only the observable interfaces are visible, while the others are hidden. SEG2106 - Chapter 1
Generalization and Specialization • In the real world there are huge amounts of similar subjects. • Rather than describing and understanding all individuals in full detail, we may describe and understand them in terms of similarity. • Types are conceptual entities that we use to structure our descriptions and thoughts. • Types are called “Classes “ in UML SEG2106 - Chapter 1
A Generalization Hierarchy SEG2106 - Chapter 1
A system specification includes assumptions and guarantees In general, a system specification has the following form: If certain assumptions about the environment are satisfied, then the system will provide certain guarantees to the environment Example of a sorting program – Specification A: If the input list of integer numbers has less than 1000 entries, then the output list will contain the same integer numbers in ascending order, however, the list may be shorter if some number occurred several times in the input list. – Note: no guarantee is given for the case that the input list contains 1000 entries or more. SEG2106 - Chapter 1
Possibilities of replacement and reuse Theorem for component-based development:Given a specification S = AS GS (assumption implies guarantee) for a component within a given system structure and an implementation satisfying the specification I = AI GI . The implementation can be used for realizing this component iff AI is weaker than AS and GI is stronger than GS . One sometimes says that I “conforms“ to S. SEG2106 - Chapter 1
Example Given implementation of a sorting program which satisfies the following Specification B: If the input list of integer numbers has less than 2000 entries, then the output list will contain the same integer numbers in ascending order, each number only once, even if the input list contains some number multiple times. Assumption (B): there is an input list of less than 2000 integers. Guarantee (B): the output list contains the same integer numbers in ascending order, each number only once. Notes: • Assumption (B) of less than 2000 is weaker than less than the assumption (less than 1000) of Specification A. • Guarantee (B) of having each number only once is stronger than the guarantee of Specification A. • The guarantee of Specification A is non-deterministic: it allows for different multiplicities of numbers in the output list. SEG2106 - Chapter 1
Different kinds of specialization • The specification I of an implementation that conforms to a given component specification S is a (conforming) specialization • If an OO class I inherits from a class S, this means that all methods provided by S (guarantees) are also provided by I, that is, the guarantees of I are stronger than the guarantees of S. This is a special kind of conforming specialization. • An implemention of the sorting function that is specialized (and optimized) for numbers between 0 and 255 can be called a “specialization” of the implementation considered above. However, it is not a conforming specification, because it has a stronger assumption (namely, the the sorted values are smaller than 255). SEG2106 - Chapter 1
Behavior Description: the Problem • The quality of a real-time system is determined to a very large extent by its behavior. • Behavior is the most difficult system aspect to describe, due to its dynamic and transient nature. • How can we represent a dynamic and possibly infinite behavior in a static and finite way? See next chapter of this course. SEG2106 - Chapter 1