0% found this document useful (0 votes)
79 views18 pages

Formalisms For System Design

1) UML is an object-oriented modeling language that can capture all design tasks through visual representations. 2) UML emphasizes object-oriented design concepts like interacting objects rather than monolithic code blocks. 3) The document discusses UML representations for structural descriptions using objects and classes, behavioral descriptions using state machines, and an example of an embedded system design.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views18 pages

Formalisms For System Design

1) UML is an object-oriented modeling language that can capture all design tasks through visual representations. 2) UML emphasizes object-oriented design concepts like interacting objects rather than monolithic code blocks. 3) The document discusses UML representations for structural descriptions using objects and classes, behavioral descriptions using state machines, and an example of an embedded system design.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

FORMALISMS FOR

SYSTEM DESIGN
01 02 03
Structural Description. Behavioural Description Embedded System Design
Example
 Visual language that can be used to capture all the design tasks: the
Unified Modeling Language (UML)
 UML is an object-oriented modeling language.
 object-oriented design emphasizes two concepts of importance:
■ It encourages the design to be described as a number of
interacting objects, rather than a few large monolithic blocks of
code.
■ At least some of those objects will correspond to real pieces of
software or hardware in the system. We can also use UML to model
the outside world that interacts with our system,in which case the
objects may correspond to people or other machines.
Object-oriented (often abbreviated OO)
specification can be seen in two complementary
ways:
 ■ Object-oriented specification allows a system to be described in a
way that closely models real-world objects and their interactions.
 ■ Object-oriented specification provides a basic set of primitives
that can be used to describe systems with particular attributes,
irrespective of the relationships of those systems’components to
real-world objects.
Structural Description
 By structural description,we mean the basic components of the
system
 The principal component of an object-oriented design is,naturally
enough,the object.An object includes a set of attributes that define
its internal state. When implemented in a programming language,
these attributes usually become variables or constants held in a data
structure.
 An object describing a display (such as a CRT screen) is shown in UML notation in Figure.The text in
the folded-corner page icon is a note;it does not correspond to an object in the system and only serves as
a comment.The attribute is, in this case, an array of pixels that holds the contents of the display.
 The object is identified in two ways:

It has a unique name,and it is a member of a class.The name is


underlined to show that this is a description of an object and not of a
class
 A class is a form of type definition—all objects derived from the same class have the same
characteristics,although their attributes may have different values.
 A class defines the attributes that an object may have. It also defines the operations that determine how
the object interacts with the rest of the world.
 A class defines both the interface for a particular type of object and that
object’s implementation. When we use an object, we do not directly manipulate
its attributes—we can only read or modify the object’s state through the
operations that define the interface to the object.
 Clearly,the choice of an interface is a very important decision in object-oriented
design. The proper interface must provide ways to access the object’s state
(since we cannot directly see the attributes) as well as ways to update the state.
There are several types of relationships that
can exist between objects and classes:
 ■ Association occurs between objects that communicate with each other but have
no ownership relationship between them.
 ■ Aggregation describes a complex object made of smaller objects.
 ■ Composition is a type of aggregation in which the owner does not allow access to
the component objects.
 ■ Generalization allows us to define one class in terms of another.
Unified Modeling Language,like most object-
oriented languages,allows us to define one class
in terms of another
A derived class inherits all
the attributes and operations
from its base class. In this
class, Display is the base
class for the two derived
classes. A derived class is
defined to include all the
attributes of its base class.
UML also allows us to define multiple inheritance,in which a class is
derived from more than one base class. (Most object-oriented
programming languages support multiple inheritance as well.)
Behavioral Description

 We have to specify the behavior of the system as well as its structure.


 One way to specify the behavior of an operation is a state machine.
 Figure shows UML states; the transition between two states is shown by a skeleton
arrow.
 These state machines will not rely on the operation of a clock,as in hardware;
rather,changes from one state to another are triggered by the occurrence of events.
A state and transition in UML.
An event is some type of action.The event
may originate outside the system,such as a
user pressing a button..

It may also originate inside,such as when one


routine finishes its computation and passes
the result on to another routine
Three types of events defined by UML
 ■ A signal is an asynchronous occurrence.It is defined in UML by an object that is
labeled as a < >.The object in the diagram serves as a declaration of the event’s
existence. Because it is an object,a signal may have parameters that are passed to
the signal’s receiver.
 ■ A callevent follows the model of a procedure call in a programming language.
 ■ A time-out event causes the machine to leave a state after a certain amount of
time.The label tm(time-value) on the edge gives the amount of time after which the
transition occurs.
Let’s consider a simple state machine specification to understand the
semantics of UML state machines. A state machine for an operation of the
display is shown in Figure

You might also like