S.E.RTS-Chapter 5
S.E.RTS-Chapter 5
System Analysis
1
System Analysis
Definition
2
System Analysis Approaches
1) Problem-Centric Approach:
● In a cruise control system for a car, the analysis phase would focus on issues like
maintaining a constant speed, adapting to changes in road conditions, and optimizing
fuel efficiency. Identifying and addressing these problems ensures a reliable and
efficient cruise control functionality.
2) Model Development:
● During the analysis phase of the cruise control system, a model might be developed to
represent the relationships between components like vehicle speed, throttle control,
and sensor inputs. This model helps visualize how the system should operate in
different driving conditions, ensuring a smooth and responsive cruise control
experience.
3) Object Model and Viewpoints:
● For the cruise control system, the Object Model could include structural views (objects
like SpeedSensor, ThrottleController), functional views (methods for adjusting speed),
and dynamic views (how the system responds to changes in speed or user input).
These viewpoints guide the development team in capturing the complexities of a
real-time system like cruise control. 3
System Analysis
4
System Analysis
● During the analysis phase, there is an emphasis on clarifying and validating the
requirements specified for the system.
● The goal is to document a comprehensive understanding of the problem, using
terms from the problem domain rather than those of the solution.
5
System Analysis
6
System Analysis
7
Object Modeling Technique (OMT)
● Object modeling in software engineering is the process of constructing
abstract representations, known as models, to depict real-world entities
through the use of objects.
● Objects, which encapsulate both data and behavior, are instantiated based on
classes that function as templates or blueprints.
● This methodology is an integral part of object-oriented analysis and design,
providing a systematic approach to organizing, abstracting, and visualizing
complex systems in software development.
8
Object Modeling Technique (OMT)
● Purpose of OMT:
1) Abstraction:
● Models provide a simplified and abstract representation of complex
systems, helping developers focus on essential aspects while ignoring
unnecessary details. This abstraction aids in understanding and managing
system complexity.
2) Communication:
● Models serve as a visual and conceptual communication tool between
different stakeholders involved in the software development process. They
help bridge the gap between technical and non-technical team members,
ensuring a common understanding of the system.
3) Visualization:
● Modeling allows developers to create visual representations of software
systems, making it easier to grasp the structure, relationships, and
interactions among various components. Visual models enhance
comprehension and facilitate discussions about design decisions. 9
Object Modeling Technique (OMT)
● Purpose of OMT:
5) Analysis:
● Models support analysis by providing a basis for evaluating the
feasibility, efficiency, and effectiveness of different design alternatives.
Through analysis, developers can identify potential issues early in the
development process, leading to better-informed decisions.
6) Design Guidance:
● Models act as a guide during the design phase, helping developers
make informed decisions about system architecture, component
interactions, and overall system behavior. They serve as a blueprint for
translating high-level requirements into concrete implementations.
10
Object Model
12
Object Model
13
14
15
Cardinality
16
17
18
Object Model and Class Diagram in System Analysis
● Importance:
● Conceptual Abstraction and System Understanding:
They play a crucial role in providing a high-level conceptual
abstraction during the analysis phase, aiding in the understanding
of the system without delving into implementation details.
● Requirements Exploration and Representation:
The models serve as a powerful tool for exploring and
representing system requirements, helping analysts identify key
entities, attributes, and interactions in a structured manner.
19
● Importance:
● Effective Communication Through Visual Language:
They act as a visual language that facilitates effective
communication between diverse stakeholders, bridging the gap
between technical and non-technical individuals involved in the
software development process.
● Flexible Iterative Refinement of System Specifications:
They offer flexibility during the analysis phase, allowing for
iterative refinement of system specifications as requirements
evolve or become more refined. Their adaptability supports
changes in the understanding of the system. 20
Dividing Class Diagram for System Analysis
21
Dividing Class Diagram for System Analysis
- Generalization
- Generalization is a relationship between entities where one
entity represents common characteristics of one or more other
entities .
22
Dividing Class Diagram for System Analysis
23
Dividing Class Diagram for System Analysis
26
Dividing Class Diagram for System Analysis
Local Hierarchies with Generalization and Aggregation:
27
Subsystem Boundary
29
Checking the Object Model
30
Checking the Object Model
31
Checking the Object Model
32
USE CASE DESCRIPTION
34
Checking the Object Model
37
Functional Model in Object Modeling
38
Functional Model in Object Modeling
39
Functional Model in Object Modeling
3) Precision:
● In the context of operation sheets, precision refers to the level of
detail provided for operations. While many operations involve
straightforward information retrieval, some require nontrivial
computations.
● Operation sheets must decide how to handle operations that
involve calculations. One approach is to explicitly state that the
computed values are correct, ensuring clarity about the
expected outcomes.
40
Functional Model in Object Modeling
3) Precision:
● Alternatively, the operation sheet may directly express the
results of the computations rather than specifying their
correctness. This approach simplifies the sheet and focuses on
conveying the intended outcomes.
41
Functional Model in Object Modeling
4) Level of Formality:
● Operation sheets can attain a level of formality by incorporating
naming conventions and utilizing predicate logic to express
conditions.
● Naming conventions help standardize the language used in the
sheets, while predicate logic adds a formal structure to the
conditions governing operations.
42
Functional Model in Object Modeling
4) Level of Formality:
● Formal specifications offer advantages such as increased
precision, reduced ambiguity, and improved clarity in
understanding the intended behavior of operations.
● They provide a structured and systematic approach to
documenting system functionalities.
43
Functional Model in Object Modeling
4) Level of Formality:
● In practice, achieving correct and highly formal specifications for
real operations can lead to almost unreadable documentation.
● This highlights the importance of pragmatism and the need for
analysts to strike a balance that ensures the precision of
formalism without sacrificing clarity and accessibility.
44
Specification: CruiseControl Conditions:
Conditions:
- If the current speed is significantly
- IF currentSpeed < desiredSpeed - 5 below the desired speed (more than 5
THEN throttlePosition = throttlePosition + mph), slightly increase throttle position to
0.1 accelerate.
- IF currentSpeed > desiredSpeed + 5 - If the current speed is significantly
THEN throttlePosition = throttlePosition - above the desired speed (more than 5
0.1 mph), slightly decrease throttle position to
- IF |currentSpeed - desiredSpeed| <= 5 decelerate.
THEN throttlePosition = throttlePosition - If the current speed is within a
tolerance of 5 mph from the desired
speed, maintain the current throttle
position to keep the vehicle at the desired
speed.
45
Dynamic Model in Object Modeling
1) Analysis of Events:
● A real-time system simultaneously responds to random occurances of
events and gives the desired responses within the required time limits.
● Events that enter the subsystem are input events; events that leave it are
output events. In the dynamic model, the focus is on the input events
because they cause the activation, suspension, termination or abortion of
operations in the subsystem.
● The output events are specified in the operation sheets of the functional
model.
49
Dynamic Model
1) Analysis of Events:
● When you press a special key on your phone, the application
system doesn't just care about the physical button press. It's more
interested in what you want to do with it—like clearing the display
or searching for a name. They call this intention a "logical event,"
focusing on the meaning behind your action in the current state of
the system.
50
Dynamic Model
1) Analysis of Events:
● In general, real-time systems have two different types of events,
Periodic and Sporadic.
● Periodic events occur at a predetermined frequency, which may or
maynot be accurate.
● For example, requesting a memory check once every 10 seconds
is a periodic event, although the intervals between successive
occurrences need not be equal.
51
Dynamic Model
1) Analysis of Events:
● Periodic events can be used to monitor the environment
and to signal when a particular condition arises.
● They are normally implemented using a clock or a timer.
● A periodic event may occur at specific times, such as the
request to generate a statistic report at 08:15 a.m. or
09:35 p.m.
52
Dynamic Model
1) Analysis of Events:
● Sporadic events occur randomly in response to a particular
condition arising in the system or in the environment.
● Sporadic events are often handled using interrupts.
● The system has to respond within a particular time frame,
called the response time.
● Sporadic events are often approximately by periodic ones in
order to estimate the processor load, and hence, to assess
the temporal behaviour of a system.
53
Dynamic Model
1) Analysis of Events:
● The analysis of events has the following steps as below :
1. Identify and describe the logical input events
2. Find the commonalities between the events and group
them
3. Fill the event sheets
54
Dynamic Model
1) Analysis of Events:
1. Identify and describe the logical input events
55
Dynamic Model
1) Analysis of Events:
1. Identify and describe the logical input events
● Dynamic modeling begins by identifying and
understanding events.
● This is achieved by examining the class diagram, especially
focusing on associations crossing the application
boundary.
56
Dynamic Model
1) Analysis of Events:
1. Identify and describe the logical input events
● Events are recognized based on associations:
○ If an association suggests autonomous interactions
from the environment to the subsystem, indicating
changes in the system, those interactions are
considered events.
57
Dynamic Model
1) Analysis of Events:
1. Identify and describe the logical input events
● Events are recognized based on associations:
○ Inheritance of a class from another subsystem does not
typically indicate an event.
○ The above cases also apply if the association between
objects is an aggregation.
58
Dynamic Model
Step 2 : Find the commonalities between the events and group them
● Grouping of events helps to manage the complexity resulting from
the possible large number of different events. It is done bottom-up:
examine the events in the event list, and identify the commonalities
between them.
● Search the commonalities in relation to the source of events, data
contents, the expected response and time requirements. The more
things you find in common, the more beneficial it becomes to group
them.
59
Dynamic Model
60
Dynamic Model
EVENTS SUBEVENTS
Cruise Control System Events Start Cruise Control System
Stop Cruise Control System
EVENTS SUBEVENTS
Brake System Events Apply Brake
Release Brake
62
SUBEVENTS WITH RELATIONS
SUBEVENTS DESCRIPTIONS
1) Adjust Throttle 1) Subevent of "Increase Throttle" and
"Decrease Throttle", responsible for
Position
adjusting the throttle position.
2) Check Speed 2) Subevent of "Adjust Speed", ensuring
the vehicle's speed matches the desired
speed.
3) Monitor Brake 3) Subevent of "Apply Brake" and "Release
Brake", monitoring the status of the
System
brake system.
4) Update Speed 4) Subevent of "Read Speed", updating the
current speed of the vehicle.
63
Dynamic Model
64
Dynamic Model
67
Dynamic Model
69
Dynamic Model
71
Event Sheet
Event: Brake Applied
Response: -
1) The system initiates the deceleration process by engaging braking
mechanisms and adjusting vehicle speed
2) If cruise control is active, it may be disengaged ( Depends on
driver input)
Association: BrakeSystem
Source: Brake Pedal
Contents:
- Brake Force: [numeric]
- Brake Pedal Position: [numeric]
Response Time: Max 100 ms, Min 50 ms
Rate: Variable (Depends on driver input) 72
2) Analysis Of States
74
Statecharts
75
Statechart
76
Statechart
77
2) Analysis Of States
78
2.2 Filling the actions table.
79
Elementary Event Action/ Activity
States
(S1.1) inactive Start (1) Initialize cruise control system.
(S1.2) active Activate (2) System becomes operational.
(3) Verify vehicle speed.
(S1.2.1) maintain Set Desired Speed (4) Set desired speed.
(5) Monitor current speed.
(S1.2.2) accelerate Accelerate (6) Increase throttle position.
(7) Monitor vehicle acceleration.
(8) Adjust throttle as needed.
(S1.3) suspended Stop (9) Suspend cruise control system.
(10) Reset system parameters. 80
3) Further Analysis of Events and States
81
3) Further Analysis of Events and States
82
3) Further Analysis of Events and States
1. Event significance analysis
● The different significance values that help signify the events
importances are:
1) Critical (c):
○ This means the event is extremely important, and the system
must always respond to it in certain states. Failure to respond
is not allowed, especially in critical situations.
2) Essential (e):
○ This means the event is important, and the system should
usually respond to it in certain states. However, occasional
failures to respond may be acceptable.
83
3) Further Analysis of Events and States
3) Ignored (0):
This means the event can be ignored in certain states. It's not
necessary for the system to respond to it.
4) Neutral (1):
This means the significance of the event depends on other
factors. It's neither critical nor essential nor can it be ignored
based solely on the current state.
84
Significance Table
S 1.1 inactive 0 0 0
S 1.2 active 1 1 1
STATES
S 1.2.1 maintain 1 1 1
S 1.2.2 accelerate e/c c/e 1
Elementary States:
Cruise.active: Cruise control system is engaged.
Compound States:
Cruise.inactive and Brake.pressed Compound state where cruise control is
disengaged when brake pedal is pressed.
86
Event Laxity Analysis
88
Event Laxity Analysis
89
Event Laxity Analysis
● Verify if two events can be combined:
1. If you find that both of them have either essential or critical
significance in the same state, and E1 causes a transition to a new
state which differs from the one caused by E2, then E1 and E2
cannot be combined.
2. If you find that one of them is essential or critical and the other is
neutral in the same state, and you find the opposite in another
concurrent state, then E1 and E2 cannot be combined.
3. In other cases, they can be combined. 90
Event Laxity Analysis
91
Classwork
A B C D
STATES
S1 0 0 0 0
S2 1 1 1 1
S3 e/c c/e 1 1
S4 1 e/c c/e 1
S5 e/c c/e c/e 1
S6 0 0 0 0
92
Classwork A B C D
STATES
S1 0 0 0 0
Compound Events:
S2 1 1 1 1
1) AD
S3 e/c c/e 1 1
2) BD
3) CD S4 1 e/c c/e 1
S5 e/c c/e c/e 1
S6 0 0 0 0
93
Analysis of the Hardware Wrapper
94
Analysis of the Hardware Wrapper
Hardware Wrapper:
● As its name suggest, it can also act on a main scale as an interface
between the application subsystem and the underlying hardware
components.
● The hardware wrapper is notated and guided similarly to an
application subsystem but with a different perspective, focusing on
the hardware interactions.
● While Octopus isolates it, it has no ability to ignore it.
95
Analysis of the Hardware Wrapper
96