Professional Documents
Culture Documents
SE Winter1415 All Merged
SE Winter1415 All Merged
Winter 2014/15
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Organisational Remarks
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Short CV of Thomas Baar
1990 – 97 Study of Computer Science at Humboldt-University,
Berlin, Germany
Areas of study:
Programming
Algorithms
Software Engineering
Artificial Intelligence
Heuristics
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Short CV of Thomas Baar
1997 – 99 Doctorate candidate, HU Berlin
Areas of research:
Quality-oriented software
development processes
Verification of software wrt.
formal specification
Specification languages and
their semantics
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Short CV of Thomas Baar
2003 – 07 Post-Doc, École Polytechnique Fédérale de Lausanne
(EPFL), Lausanne, Switzerland
- Areas of research:
System development
System specification
System test
System verification
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Short CV of Thomas Baar
2007 - 11 Senior Engineer, Software Consultant Company, Berlin
Areas of work
Teaching in Course Program 'Computer
Engineering' (Bachelor)
Teaching in Course Program 'Systems
Engineering' (Master)
Cooperations with Local Industy (Internet
Security Solutions, German Railways, Real
Estate Management, Engineering Services)
Own Research (Configuration Management,
System Re-engineering, Model-Based
Software Engineering)
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Who are you?
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Format of Teaching
• Lecture
- Thursday, 8:45 - 10:15 a.m.
- Don't be late!
- Classic lecture but you can ask/interrupt at any time.
- Homework assignments at end of most lectures.
To be solved individually.
• Excercises
- Thursday, 10:30 - 12:00 a.m.
- Don't be late!
- Solution of homework
- Work on bigger project
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 9
Moodle
• (not yet) available at
https://moodle.htw-berlin.de/
• central place to put all artefacts produced in
this course:
- my slides, homework assignments, etc.
- your homework solutions, project documentation
- further readings, links, etc.
- software (snippets)
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Change in Schedule
• No Lecture/Excercise next week (October 16th)
- Reason: I will attend a conference in France.
- New date for this lecture: to be announced
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Exam of this Course
• Form is not decided yet :-(
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Lecture
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Today's Topic
Systems Engineering -- Basic Terms
System Engineering is a discipline that proposes methods, approaches,
heuristics for solving problems, no matter of which type the problems
are. System Engineering has many overlaps with other disciplines, e.g.
Project Management, Systems Thinking, Design Thinking .
System Engineering stresses the need to first describe a problem
adequately, i.e. to uncover all persons, technical systems that are
involved in the problem or that might be affected by its solution.
Problem descriptions are often formulated using natural (informal)
language (such as English), but sometimes special notations are used.
Solution
Note: Systems Engineering alone, however, does not solve any problem!
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
System Thinking
• Aims at
- structuring phenomena
- describe relations and dependencies between
identified entities
• Results in
- better understanding of the problem (Current +
Desired Situation)
- larger possibilities to change the situation
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 17
Methodology
• defines the steps to reach the project goals
- steps are comparable even across projects in
different domains
- aggregates single steps to manageable chunks
(phases)
- identifies roles of persons (stakeholders)
together with their responsibilities wrt. the
identified steps
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 18
Definition Systems Engineering
"Systems Engineering is an interdisciplinary approach and means to enable the
realization of successful systems. It focuses on defining customer needs and
required functionality early in the development cycle, documenting
requirements, then proceeding with design synthesis and system validation
while considering the complete problem:
Operations, Cost & Schedule, Performance, Training & Support, Test, Disposal,
Manufacturing
Systems Engineering integrates all the disciplines and specialty groups into a
team effort forming a structured development process that proceeds from
concept to production to operation. Systems Engineering considers both the
business and the technical needs of all customers with the goal of providing a
quality product that meets the user needs."
Source: International Council on Systems Engineering (INCOSE)
http://www.incose.org/practice/whatissystemseng.aspx
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 19
What is a System?
• consists of elements
• elements are interrelated
• all elements together are considered to form
one whole
Open System -
- elements have also relations to elements outside
the system
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 20
System Boundary
• separates elements
inside/outside the system Surrounding/Environment
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 21
System
Example Factory
• Elements
- Employee, Department, Organizational Rule, Machine,
Product, Material, Intermediate Product, Building
• Relations
- Material Flow, Information Flow, Supervisor
As Open System
• Elements
- Customer, Supplier, Regulations/Laws
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 22
Challenges of Project Management
• Project Management has ...
"to translate complex requirements into working
systems"
"to deal with fuzzy and shifting requirements "
"to assess and manage risk"
"to organize and manage teams"
"to satisfy customers"
Lect. 01: 2014-10-09 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 23
Systems Engineering
Winter 2014/15
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Organisational Remarks
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Exam of this Course
• Solving Homework-Assignments is strongly
recommendated
- Feedback will be given
- However, no grades
• Course exam is written test at the end of semester
- Proposal for date:
last week in teaching period
Thursday: Feb 12th 2015, 8:45 - 10:15 a.m.
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Lecture
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Today's Topic
Domain Modeling
Systems engineers and all other stakeholders of a project must
be able to understand each other, no matter what the
professional background of each person is. Stakeholders need a
common understanding of the basic terms within the problem
domain.
Domain modeling is a technique to represent the knowledge on a
certain problem domain. Unlike the glossary, which is held
informally using natural language, domain models are
formulated by using Class Diagrams.
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Model
A model …
- is a simplified representation of (an abstraction from)
the real world
- should serve a well-defined purpose
- has an tremendous impact on how a problem is attacked
Modeling is a fundamental activity in all engineering disciplines
- Architecture (architect’s plan)
- Physics (Bohr’s atom model, different models of light)
- Chemistry (carbohydrate compounds)
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Model
A model can explain some but not all phenomena
- Models have limitations
- If a model is too abstract we cannot deduce all
properties that are relevant
- If a model is too detailed we need extra effort to
distinguish the important from the less important facts
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Model - Example
(a pictur of)
the real world
Model
Purpose ?
Model
Purpose ?
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Model - Example
Model
Purpose ?
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Systems consist
of Elements (aka. Objects)
• A system
- consists of elements
- elements might have relationships
- boundary of system not always clear cut
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Objects -- Examples
The printer Talisker, of type Laserwriter, made by Canon, located in
room PBH2003...
The student Sven Svenson has just arrived in Berlin, attends the
Systems Engineering course and is still looking for a flat ...
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 14
Objects: Identity and State
Identity is the property that distinguishes an object from all
others
- The identity of an object cannot be changed
- The name of an object should not be confused with its
identity
The state of an object is given by the values of its attributes
- It is always possible to distinguish two distinct objects,
even if they are in the same state
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
Attribute Values
A data(value) is a characteristic that can be measured, or it is
defined by agreement. A datavalue has no existence by its own, and
therefore no identity.
The attributes of an object remain the same, but their values may
change. The pair <attribute, value> for an object is also called slot.
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 17
Examples of Attributes
"The height of this building is twelve meters."
• this building is an object,
• it has the attribute height,
• which has the value twelve.
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 19
Examples of Attributes
"The color of the building is navy blue."
• the possible values for attribute color are subject of agreement
• What is the difference between blue and navy blue?
• Color could be different for outside / inside - Do we have only one
attribute color?
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 20
Excercise
-Rathaus
Color=Red
Height(m)=35
-Tram 1
Color= Yellow
Size=20
-Tram 2
Color= Yellow
Size=30
-Tram 3
Color= Yellow
Size=15
Photograph
NumberOfTrams=3
Relationship (shown @)
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 21
Class
A class describes a set of objects that share the same attributes,
relationships, and operations. The members of the set are called
instances of the class
Each class declares the attributes which are common among all its
instances. The declaration of the attribute’s datatype is optional in
the domain model
Anonymous
object identity
Object identity
Slot
(attributename = value)
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 23
Graphical Representation of Classes:
Class Diagrams
• A Class diagram shows the name and structure of classes (and thus the
structure of all their instances) together with possible relationsships
between instances of classes. The structure of a class is given by its set
of attributes (Note, that the value of an attribute belongs to a concrete
object, not the class! Thus, Class diagrams DO NOT show attribute
values!) and its set of operations.
Enumeration
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 24
Combined Class and Object diagram
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 25
Excercise
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 26
(Binary) Associations
A (binary) association between (two) classes denotes a relationship that can hold
between the instances of these classes.
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 27
(Binary) Associations
Multiplicity Association name
Read direction arrow
Link
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 28
Association – Optional Adorments
Class1 role1 Asso > role2 Class 2
Mult 1 Mult 2
• Association name
- describes the Relationship between objects of connected classes
- 'Reading direction arrow' is often not shown
• Role name
- Characterize the Role an object plays wrt. to the opposite object
- Default-Wert ist If no role is shown, the default role is the 'lowercased'
class name at this association end (PrinterMng --> printerMng; only first
letter is made lowercase)
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 29
Association – Optional Adorments
Class1 role1 Asso > role2 Class 2
Mult 1 Mult 2
Multiplicity
Each object of Class1 is connected with mult2-many objects of Class
- Is given as a range
0..1 - zero or one
1,4,7 - exactly one, exactly four, or exactly seven
1..10 - one to ten
1..* - one or more
0..* - zeor or more
* - abbreviation for 0..*
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 31
Class-Diagram: Example
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 32
Class-Diagram: Example
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 33
Homework
Finding Attributes
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 34
Homework
Domain Model
Lect. 03: 2014-10-23 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 35
Systems Engineering
Winter 2014/15
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Today's Topic
Advanced Class Diagrams
So far, we have used for Domain Modeling only basic constructs
of Class Diagrams. Although this fragment of Class Diagrams is
already quite expressive and can model many phenomena, there
are further constructs to be used. Examples for such
constructs are Packages, Generalization and Composition.
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Packages - Structuring Class Models
Problem: Class Diagrams can become very large when they model real
systems
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Packages - Structuring Class Models
Solution: Distribute all classes across different packages. You can
think of a package as being a folder to place classes.
Generalization Superclass
Generalization
Subclass
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Semantics of Generalization
Generalizations express a IS-A-relationsship for the objects of two
connected classes.
As
Payment Venn-Diagram
Cash- Card- Check-
Payment Payment Payment
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Excercise
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Abstract Classes
One can declare a class to be abstract.
Semantics/Meaning: Class has no direct instance
Notation: Set the classname in italic or add stereotype <<abstract>>
Payment
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 9
Keep Object Type Static!
The type of an object is that class from the class diagram, which the
object is an instance of. Class hierarchies should be modeled in such a
way, that there is no need to change type of an object during the
object's lifecycle.
poor better
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Composition
Composition is a stronger form of an association (binary
relationship). It is used to indicate a Container-Element- (or
Whole-Part)-relationship between instances of the connected
classes. A composition is marked by a filled diamond at the
Container-end of the connecting line.
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Composition - Example
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Composition -- Examples
"A company consists of units (at least one). A unit can either be
atomic or it can consists of other units (which are subunits). An
atomic unit is also called ProjectTeam. "
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Constraints for Associations
Multiplicities at association ends constrain the number of links an object can
participate in. Sometimes, however, multiplicities are not expressive enough. In this
cases, one can add further constraints in form of notes.
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
Reification
Reification means to model a relationship between objects of two classes
in terms of an additional class. This technique allows to substitute in a
class model an association by a class.
New
Class
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 18
Homework
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 19
Homework
Graph / Multigraph
Create a Domain Model for ...
• ... Graphs. A Graph consists of nodes and directed
edges. Each edge connects exactly two nodes. Any two
nodes are connected by at most one edge (for each
direction).
• ... Multigraphs. A Multigraph is a graph, where any tow
nodes can be connected by an arbitrary number of
edges. Furthermore, edges within a multigraph have a
length.
Lect. 04: 2014-10-30 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 20
Systems Engineering
Winter 2014/15
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Today's Topic
Metamodeling
So far, we have used Domain Modeling for describing facts and
phenomena from different problem domains (sports, university
adminstration, business structure).
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Structure of English Sentences
Subject Predicate
1) I read a book.
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Structure of English Sentences
Subject Predicate
3rd Person
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Structure of English Sentences
Subject Predicate
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Structure of English Sentences
Subject Predicate
Plural Plural
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Structure of English Sentences
Subject Predicate
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Excercise
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Object Model for Parsed
Sentence (Metamodel-Instance)
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Object Model for Parsed
Sentence (Metamodel-Instance)
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Metamodeling the Syntax of
Class Diagrams
• When metamodeling the syntax of Modeling Languages
(such as Class Diagram) we
- uncover the inner structure of the Modeling Language
- abstract from graphical representations of language
constructs, e.g.
that a class is represented by an rectangle
that the class name is put in the first compartment of the
rectangle and the class' attributes in the second
that multiplicities are placed near the association ends
...
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Syntax of Class Diagrams Enumeration
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 14
(Simplified) Metamodel for Class Diagrams
*
x
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
Representing a Class Diagram as MM-Instance
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
Excercise
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 17
Excerpt from Offical Metamodel for Class Diagrams(UML 1.4)
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 18
Excerpt from Offical Metamodel for Class Diagrams(UML 1.4)
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 19
Syntax of Object Diagrams
Instantiated
class (aka
Object
type of object)
Anonymous
object identity
Object identity
Slot
(attributename = value)
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 20
Excercise
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 21
Homework
Lect. 05: 2014-11-06 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 22
Systems Engineering
Winter 2014/15
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Today's Topic
State-Diagrams
Problem: Systems interact with their environment by (1) consuming input
signals (e.g. press a button) and by (2) generating output signals (e.g. switch
on a light). The mapping INPUT -> OUTPUT is in most cases not a static
function ( f(i) = o ). Rather, the generated output depends not only on the
input but also on the current state of the system. Unfortunately, neither
pure mathematical concepts (like sets, functions) nor pure informal
descriptions in natural language are appropriate to describe this input-
output-relationship.
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Literature
• Martin Fowler: UML Distilled.
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
History of State-Diagrams
• In Computer Science, the state automaton is a very old and proven
concept
- By consuming an input signal, the automaton can switch to a new state
state change can cause an output signal
• David Harel, Professor at Weizman Institute (Israel) has added in the
80ies many useful concepts to classic state automata and called the
resulting formalism State Charts . The added concepts are:
- Hierarchical States
- Concurrent States
- (History States)
• State Diagrams are heavily influenced by State Charts
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Example Digital Watch–
Informal Description
• 2 Modes
- Display the current time
- Set the watch
Done via
●
Press Button 1: choose which of
the time's constituents (hour,
minute, second) is set
●
Press Button 2: Increase the
value of the selected
constituent by 1
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Example Digital Watch–
Model 1
Transition
Initial State Aktion
State
Event
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Example Digital Watch–
Model 1
• States:
- "Time Displayed", "Adjust Hours", "Adjust
Minutes","Adjust Seconds"
• Events:
- "pressBtn1", "pressBtn1"
• Actions:
- none (only explicit state changes)
• State Variables
- "hours", "minutes", "seconds"
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Example Digital Watch–
Model 2
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Example Digital Watch–
Model 1 2
• States:
- "Time Displayed", "Adjust Hours", "Adjust Minutes","Adjust
Seconds"
• Events:
- "pressBtn1", "pressBtn1"
• Actions:
- none (only explicit state changes)
• State Variables
- "hours", "minutes", "seconds"
- "flashingH", "flashingM", "flashingS"
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 9
Example Digital Watch–
Model 3
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Example ParkingTicketMachine
Guard
Same event at
transitions starting
in same state
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Syntax of State Diagrams
Final State
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
State
• Always finite number of states
• Represents abstraction for different behaviour of the system
wrt. input signals
• During system execution, there is always one "active" state
• Initial State
- Represents start of the system
- No (!) incoming transitions
- Outgoing transitions always without event
• Finale State
- Represents end of system execution
- No outgoing transitions
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Event
Event Types:
- Receiving of a message (e.g. button pressed, card
inserted)
- Time event
after(4Sec)
- Entry/exit – Events for entering/leaving a state
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 14
Transition
• State change from Pre-State to Post-State
• Transition "fires" if
- Pre-State of transition is active state of system
- und Annotated Event occurred
- und Annotated Condition (Guard) holds in active state
• Fired Transition causes
- change of active system state Pre-State -> Post-State
- execution of annotated actions
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
Action
• Represents observable behaviour
- Sending a message to the environment
- Updating system variables
• Triggered by transition execution
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
Simulation of Entry-/Exit-Actions
States of a Door
• Please formalize the following informal statements in form of a
State-Diagram:
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 18
Homework
Theater Tickets
• Please formalize the following informal statements in form of a
State-Diagram:
Theater Tickets
• Please formalize the following informal statements in form of a
State-Diagram:
Lect. 06: 2014-11-13 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 20
Systems Engineering
Winter 2014/15
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Hierarchical State
Hierarchical States contain other states, which react on
(some) events the same way. Hierarchical States can be of
great help to simplify State-Diagrams.
is equivalent to
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Game with Markers
Which state is reached after input sequence of events?
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Excercise
States of a Door
• Please formalize the following informal statements in form of a State-Diagram:
• Solve this problem using a state diagram, which has a Hierarchical State.
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Using State-Diagrams to Control (the State of)
Other Objects
So far, we encoded the whole system as a State-Diagram (including variables to
store some values). Let's point out input (events), output (actions) and internal
variables:
Events
Variables
(here shown
as attributes)
Operations show
on which events
an object can react
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Using State-Diagrams to Control (the State of)
Other Objects
Actions
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Using State-Diagrams to Control
(the State of) Other Objects
The outgoing actions were without any effect, so far. However, the
outgoing actions can be the input event for another system.
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Using State-Diagrams to Control
(the State of) Other Objects
Please identify input (events), output (actions) and internal variables:
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 9
Using State-Diagrams to Control
(the State of) Other Objects
Please identify input (events), output (actions) and internal variables:
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Using State-Diagrams to Control
(the State of) Other Objects
Connecting Controller with Controlled-Object
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Using State-Diagrams to Control
(the State of) Other Objects
Please identify input (events), output (actions) and internal variables:
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Homework
Theater Tickets
• Change the solution for the homework 'Theater Tickets' in such a
way, that also Hierarchical States are used in a meaningful way. Do
you think that the new model is now more readable?
Lect. 08: 2014-11-27 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Systems Engineering
Winter 2014/15
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Determinism vs. Non-Determinism
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Deterministic vs. Non-Deterministic
State-Diagrams
Deterministic
- Whenever an event occurs and multiple transitions could fire, the
machine can decide which transition to take
- Structural Criterion: Outgoing transitions annotated with the same
event do have disjunct guards
- Normally, one is interested in deterministic State-Diagrams
Non-Deterministic
- There is at least one combination of state and event, so that
multiple post-states are possible.
Non-Determinism:
On occurence of 'b', there
is no unique post state
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Resolving Non-Determinism --
1) Explicit Guards
Resolving Indeterminism:
Guard is added with disjunct
conditions
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Resolving Non-Determinism --
2) Refinement of State
Resolving Non-Determinism:
Pre-State is refined by
Hierarchical State
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Excercise
Choice Construct
Default Outgoing
Transition
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Parallel Composition
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 9
Parallel Composition
• Parallel Composition is the besides Hierarchical States the 2nd
form of state composition
• A Parallel (Composed) State consists of so-called Regions.
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Parallel Composition
Parallel State
Region
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Parallel Composition
Outgoing Transition
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Parallel Composition
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Example Parallel Composition
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 14
Excercise
Lect. 09: 2014-12-04 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
Systems Engineering
Winter 2014/15
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Today's Topic
Formal Grammars
In the past, we have seen metamodeling mainly as a technique to describe
the structure of technical languages, such as Class Diagrams or State
Diagrams. Often, these languages have a graphical syntax.
However, as the example of the metamodel for the English language has
shown us, metamodeling can also be applied for textual languages.
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
EBNF - The Traditional Form to
define Formal Grammars
• EBNF - Extended Backus-Naur-Form
- formalism to specify formal grammars
• Became fundamentally important in Computer Science
(CS), because CS deals with many textual technical
languages, e.g.
- programming languages such as FORTRAN, PASCAL, C++,
Java, ...
- input languages, e.g. in Excel
Example: compute the content of a cell (e.g.
= SUM(A19, A22))
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
EBNF - Extended Backus-Naur-Form
• John W. Backus (1924 – 2007)
- US Computer Pioneer
- Head of IBM's development team for
FORTRAN
Developed FORTRAN-Compiler
1954 – 57
Invented the Backus-Form to define Source: Wikipedia
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
EBNF - Extended Backus-Naur-Form
• Peter Naur (1928 - )
- Turing-Award 2005
Source: Wikipedia
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
EBNF - Extended Backus-Naur-Form
• is formalism to define a grammar
- Grammar defines the syntax of textual languages
- Grammar is the basis to decide, whether a given text (e.g.
"Cats need dogs.") is a syntactically correct sentence of the
language. The process of checking the correctness is called
parsing.
• Grammar consists of
- Set of (Deriviation)Rules: LHS : RHS
LHS/RHS – Left-Hand Side/Right-Hand Side
LHS is a Non-Terminal Symbol
RHS is made of Non-Terminal and Terminal Symbols
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 7
Non-Terminal Symbol EBNF – Example Terminal Symbol
digit : "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
char : "a"|"b"|...|"z"|"A"|"B"|...|"Z"
Start-Symbol is exp
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
EBNF
• Terminal Symbol – such as "CREATE", "a", "4"
- Atomic part of a sentence
- Quotes (" or ') are used in the language to mark a symbol as terminal symbol
• Non-Terminal Symbol – such as name
- Represents a part of a text, which has a structure according to the RHS of the
rule
• (Derivation)Rule – digit : "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 9
EBNF - Operators
• Sequence X Y
- Meaning: Representation of (Non-Terminal or
Terminal Symbol) Y follows directly after
representation of X
The representations of X and Y are separated by a
whitespace-character (' ' or tabulator or new line)
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
EBNF - Operators
• Alternative X | Y
- Meaning: Either (represention of) X or
(representation) of Y
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
EBNF - Operators
• (mandatory) Repetition X +
- Meaning: (presentation of) X repeated as many
times as necessary, but at least once
Remark: (Some) Dialects of EBNF use curly braces
{ X } instead of X +
Example: A : "1"+
Possible Derivations are 1 or 11 or 111 or ...
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
EBNF - Operators
• (non-mandatory) Repetition X *
- Meaning: (presentation of) X repeated as many
times as necessary; represent perhaps also
empty input
Example: A : "1"*
Possible Derivations are (empty) or 1 or 11 or 111 or
...
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
EBNF - Operators
• Optional Occurrence X ?
- Meaning: empty input or (representation of) X
once
Remark: (Some) Dialects of EBNF use square brackets
( [ X ] ) instead of X ?
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 14
EBNF - Operators
• Grouping ( X Y )
- Meaning: Groups the enclosed part (here symbols
X, Y) together; Operators put on () apply to what
is enclosed
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
Definining Grammars with XText
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
XText
• Open-Source Eclipse-Plugin
- Installation:
Download installation package (Full Eclipse) from
https://eclipse.org/Xtext/download.html
Create a new folder on your machine
Unzip the downloaded file into this folder
• same authors as Yakindu-Plugin (we used for
drawing state diagrams)
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 17
Usage of XText
• Create an XText-Project ( File > New > Other ... > XText
> Xtext Project )
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 21
Grammar Constructs in XText
Parsing rules
- CrossReferences
refer to other elements in the sentence
●
referred element seems to be a rule, but is actually a type (which
coincide in many cases with the rule)
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 22
Example English Language
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 23
Example: English
Suppose, you had to decide, whether the following sentences
are syntactically correct. How would you do this?
1)I read a book.
2)Tom needs some money.
3)He reads these books.
4)Cats need dogs.
5)This boy wants this girl.
6)These dogs want those cats.
7)This dog want this cat.
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 24
Structure of English Sentences
Subject Predicate
1) I read a book.
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 25
Structure of English Sentences
Subject Predicate
3rd Person
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 26
Structure of English Sentences
Subject Predicate
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 27
Structure of English Sentences
Subject Predicate
Plural Plural
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 28
Structure of English Sentences
Subject Predicate
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 29
Excercise
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 32
Metamodeling and Grammar
Grammars can be mapped (at least partially) to metamodels. If we know the
metamodel of a language, it is often straightforward to define a
corresponding grammar.
digit : "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
num : digit +
char : "a"|"b"|...|"z"|"A"|"B"|...|"Z"
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 33
Homework
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 34
Homework
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 35
Homework
Lect. 10: 2014-12-11 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 36
Systems Engineering
Winter 2014/15
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Lecture
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Today's Topic
Use Case Model
Problem: At the very beginning of a project, the customer has
only a rough idea what the system under development (SuD) is
supposed to do and who will use the system.
Use Case (UC) modeling is a technique to express the desired
behavior (i.e. functional requirements for SuD) in a structured
way. After the UC model has been developed, both customer
and system developer have a clear and common(!) idea on the
purpose, possible users, and desired behavior of the SuD.
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Literature
Ivar Jacobson:
Use cases - Yesterday, today, and tomorrow; In Journal on
Software and Systems Modeling, 3:210-220, 2004.
• Interesting notes on the history of use cases
Alistair Cockburn:
Writing Effective Use Cases; Addison-Wesley, 2001.
• Most influential book on the art to formulate use cases
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 4
Introductory Example
Money Machine (aka Automated Teller Machine (ATM))
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Introductory Example
Money Machine (aka Automated Teller Machine (ATM))
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Use Case Model - Diagrammatic Part
Subject
Subject Boundary (system, subsystem)
WithdrawCash «actor»
Customer BankSystem
Actor
DepositMoney
ChangePIN
ServicePerson
Role Name
The diagrammatic part gives an overview on the desired context of the subject and
interactions between users and subject. UC diagram identifies the desired
functionality (use cases) including all involved actors.
Use Case – represents interaction between actors and subject, UCs are
labeled with the goal of the primary actor
Actor – Primary Actor: uses the subject and tries to achieve a certain goal
Technical Language
User's Language (System Level)
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Actors
Automated Teller Machine (ATM)
WithdrawCash «actor»
Customer BankSystem
ChangePIN
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Actors
Automated Teller Machine (ATM)
WithdrawCash «actor»
Customer BankSystem
ChangePIN
MaintainATM
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Actors and Goals
A high number of actors simplifies the finding of use cases.
SalesManager
WithdrawCash «actor»
Customer BankSystem
DepositMoney
ChangePIN
ServicePerson
Computer system
actors are not shown
MaintainATM
in stickman notation
- alternative flows
optional behavior or exceptions/errors
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
•
Story - Example
DepositCash (basic flow)
1) The Customer inserts the bank card into the ATM and enters the Personal
Identification Number (PIN).
2) The System validates the PIN and queries BankSystem to validate the Customer’s
account.
3) The Customer indicates the wish to deposit cash and inserts all banknotes for deposit.
4) The System checks the banknotes and notifies the overall amount of inserted money.
6) The System informs the BankingSystem to book the amount on the Customer’s
account.
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
Story – General Structure
1) The primary actor sends request and data to the
system
- Subject: actor/system who is controlling the action (who has the ball)
The System deducts the amount from the account balance.
• Show clearly "Who has the ball“
- Don't fall into the trap to take only the system's perspective.
The Customer puts card and PIN into the ATM.
Get ATM card and PIN.
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 22
UC Description - How to Formulate
• Show the process moving forward
- Find the right granularity for events.
- Ask "Why is the actor doing that?"
- Cockburn: Good main scenarios don't have more than 9 steps.
User enters name and address.
User hits tab key.
}
Instead of
1. The Customer enters the order number. The System detects that it
matches the winning number of the month. The System registers the
Customer and order number as the month's winner, and sends an email
to the SalesManager. The System congratulates the Customer and
gives them instructions on how to collect the prize.
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 24
UC Description - How to Formulate
'Validate' instead of 'Check Whether'
- If the system has to verify something, 'check' is a poor word
Does not move the process forward
You always had to write later "If the check passes..." "If the check
fails..."
Better words to use: 'establish', 'validate', 'ensure', 'verify'
Instead of
1. The System checks whether the password is correct.
2. If it is, the System asks the Database for User's profile.
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 25
UC Description - How to Formulate
'Validate' instead of 'Check Whether'
●
If the system has to verify something, 'check' is a poor word
– Does not move the process forward
●
You always had to write later "If the check passes..." "If the check
fails..."
• Better words to use: 'establish', 'validate', 'ensure', 'verify'
1. The System validates that the password is correct.
2. The System asks the Database for User's profile.
Instead of
1. The System checks whether the password is correct.
2. If it is, the System asks the Database for User's profile.
Lect. 12: 2015-01-08 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 26
UC Description - How to Formulate
Idiom "Do Steps x - y until Condition"
1) The use case starts when the Customer inserts the bank card.
2) The system reads the card and requests the Customer to enter the Personal
Identification Number(PIN).
5) The system requests the amount to be dispensed and the Customer shall enter
the amount.
Winter 2014/15
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 1
Today's Topic
Advanced Use Case Modeling
The last lecture has introduced the most basic elements for
use case modeling: Actor, subject (system), use case, flow of
events, ‘Happy Day Scenario’.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 2
Template for Use Case Descriptions
Use case descriptions are often formulated in a semi-formal way. We use
the following template:
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 3
Example: BuyDrink
Use Case: Buy Drink
Brief Description: The Consumer wants to buy a drink from the drink
vending machine. This involves the exchange of a certain amount of money
for a drink.
3a. System determines that there are insufficient funds for the
purchase.
3a.1. System informs Consumer.
3a.2. Use Case continues at step 1 or 2.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 5
Example: BuyDrink
Extensions:
4a. System determines that there are no drinks left in that
category.
4a.1. System informs Consumer.
4a.2. Use Case continues at step 1 or 2.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 6
Example: Authenticate
Use Case: AuthenticateCustomer
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 8
Example: Authenticate
Extensions:
3b. System times out on waiting for Customer to provide PIN.
3b.1. System ejects the card.
3b.2 Use case ends in failure.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 10
Bird’s Eye View on Scenarios
Use Case starts
- State
- Event
Extensions
(Step)
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 11
Success and Failure
A use case is usually described by both
successful and unsuccessful scenarios.
Success Scenario
All of the interests of the actors are satisfied (goal
was achieved). The goal of the primary actor A was achieved
Failure Scenario
Goal was not achieved.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 12
Primary Actor
Primary actor
the actor who has invoked the use case and whose goal
should be achieved
if the use case is triggered by a (time) condition, the
System itself is the primary actor
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 13
Numbering scheme
Each step is numbered by a sequence of digits, characters and
auxiliary symbols.
• The last element in the sequence is always ‘.’ (dot), which do not
belong to the current number.
1. Customer inserts card.
Instead of
1 Customer inserts card.
• Consecutive numbers mean one after the other (unless you have
specified that order is not important, e.g. “Step 1-4 can occur in
any order")
1. Customer inserts card.
2. System validates card type.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 14
Numbering scheme (contd)
There can be some nesting in the occurrence of events. We distinguish 3
cases:
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 15
Numbering scheme (contd)
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 16
Types of Extensions
Extensions are necessary in one of the following situations (among others):
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 17
Phrases to Structure the Flow
(1-5)a (at any time in steps 1..5)
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 18
Homework
Metamodel/Grammar for UseCase
Descriptions
• We have used a template to capture the textual part of
UseCases. The template provides slots, for example, to name the
primary actor or to formulate the Happy-Day-Scenario or the
Extensions of it.
Lect. 13: 2015-01-15 T.Baar: Systems Engineering Winter 2014/15, HTW Berlin 19