Anda di halaman 1dari 29

1

Modelling SA
Konsep dan Modeling
Fajar Pradana S.ST., M.Eng
2

SA Modelling
• Pertama kali dipopulerkan oleh T. DeMarco (1979) Structured
Analysis and System Specification
• Perluasan notasi untuk kebutuhan real-time systems oleh Hatley
dan Pirbhai (1987) – SA/RT Strategies for Real-Time System
Specification

Processes

Data Behavior
3

Elemen-Elemen Pemodelan

Process
Data Object
Specificatio
Description
Data Flown (PSPEC)
ER
Diagram
Diagram
(DFD)
Data
Dictionary

State
Transition
Diagram
(STD)

Control
Specificatio
n (CSPEC)
4

Data Dictionary
Representasi Simbol :
= : composed of + : and
{} : iterations of [….|…] : selection / or
() : optional “ “ : literal
* * : comment/description

Vend product (partly) :


Name Element Type
object [coin | slug](product) data
product [ice cream | coffee | candy] data
coins 0{[quarter | nickel | dime]}8 data
product available [TRUE | FALSE]
control
[“YES” | “NO”]
quarter *25 cents US currency*
coin return request [TRUE | FALSE]
control
5

Data Flow Diagram (Process Model)


• Useful for analyzing existing as well as proposed systems process
decomposition
• Focus on the movement of data between external entities and
processes, and between processes and data stores
• A relatively simple technique to learn and use
• Model elements: terminator, process, data flow, control flow,
storage, control bar
• The highest level (0) Context diagram
▪ Single process
▪ Terminators
▪ Data flows, control flows
6

Elemen – Elemen DFD


• Terminator/ External Entity
▪ Representasi entitas eksternal
▪ Notasi: persegi panjang
Customer
▪ Tidak memproses data
• Data flow
▪ Representasi aliran data
▪ Notasi: anak panah penuh data
▪ Umumnya satu arah
▪ Hubungkan terminator, process dan storage
• Control flow
▪ Representasi aliran kontrol proses
▪ Notasi: anak panah putus2 control
▪ Hubungkan terminator, process dan control bar
7

Elemen – Elemen DFD (2)


• Process
1
▪ Representasi aktifitas sistem
▪ Notasi: lingkaran
Proses A
▪ Memproses data
• Storage
▪ Representasi tempat penyimpanan data
▪ Notasi: dua garis paralel data X
▪ Data flow in = diubah, data flow out = dibaca
• Control bar
▪ Representasi spesifikasi kontrol
▪ Notasi: garis tegak
8

Panduan DFD
• Jumlah proses dalam satu diagram DFD : 4 + 2
• Maks. 4 level dekomposisi (DFD/CFD)
• Dekomposisi fungsional (DFD) :
▪ fungsi-fungsi yang saling berhubungan dikelompokkan
▪ fungsi-fungsi yang tidak berhubungan dipisahkan
▪ setiap fungsi dispesifikasi hanya sekali
• Data flow membawa informasi yg diperlukan oleh sebuah proses
untuk transformasi, control flow membawa informasi yang harus
diinterpretasikan untuk merubah perilaku sistem dan/ aktifasi
proses (Trigger)
▪ Proses pemodelan DFD/CFD adalah proses iterasi, tidak sekali jadi
▪ Penjenjangan CFD harus sesuai dengan DFD
9

Data/Control Context Diagram (DCD/CCD)

object
returned coins
0*

customer
selection Vend
Customer Customer
product

slug
product

coin return
request product
available
10

Data/Control Flow Diagram (DFD/CFD level 1)


coin return
object request
coins

1* 5* returned
slug Get payment Dispense coins
customer change
payment sufficient change due
coin detected payment 3p
Validate product
payment product
price 6p
available product
2p Dispense
dispensed
Get product
product 4p valid
valid
price Get valid selection
price table selection
selection
customer product products
selection available
11

Data/Control Flow Diagram (DFD/CFD level 2)

coin return
request
product
change due
available

5.1p change coins returned coins


Get change
coin

5.2p
Get payment coins
coins payment
coin
payment
12

PSPEC
• Inputs : payment (data in)
• price (data in)
• Outputs : change due (data out)
• sufficient payment (control out)
• Body :
• IF payment >= price THEN
• change due = payment – price
• sufficient payment = TRUE
• ELSE
• change due = 0
• sufficient payment = FALSE
• END IF
13

CSPEC

get
coin return product get change
payment
request available coin
coin

TRUE TRUE 1 0

D/C FALSE 0 1
14

Functional Design approach


• Transform Mapping - langkah perancangan untuk tipe DFD transform flow:
▪ Incoming flow : aliran/jalur informasi eksternal masuk ke sistem untuk
ditransformasikan menjadi informasi internal
▪ Transform center : pusat transformasi di dalam sistem yang akan
mentriger informasi keluar dari sistem
▪ Outgoing flow : aliran/jalur informasi internal keluar dari sistem
menjadi informasi eksternal
• Transaction Mapping - langkah perancangan untuk tipe DFD transaction
flow :
▪ Transaction : data tunggal yang mentriger satu atau beberapa aliran
data
▪ Transaction center : penghubung antara aliran-aliran data hasil
pentrigeran dengan data trigernya
▪ Action path : aliran/jalur informasi hasil triger
15

Functional Design approach


16

Functional Design Approaches


• Transform flow : tipe dasar DFD
b

a e
incoming
flow d
c

transfor
h
m center f
g
• Transaction flow :
outgoing
flow
transactio b
transactio n center
n
a c f

action
path d e
g
h
17

Transform Mapping
• Langkah-langkah Transform Mapping :
▪ Review dan refine DFD sampai ke level paling bawah
▪ Tentukan apakah DFD tsb. memiliki karakteristik tipe transform flow
atau transaction flow
▪ Tentukan batas antara incoming flow, transform center dan outgoing
flow
▪ Bangun first level factoring
▪ Bangun second level factoring
▪ Refine first iteration
• Contoh Transform Mapping : SafeHome Security Software
18

Contoh

user commands configuration


Control 2* configuration
and data data
panel Configur information
e system
1*
Interact configure
with user request configuration configuration
data data

start stop 3
password Activate
/deactivat
e sytem
A/D msg. 4
5* display Control
valid ID msg. Display information
Process panel
messages
password display
and status
sensor
Alarm
information
6*
sensor status alarm type
Sensors Monitor
Telephone
sensors telephone number tones line
19

Contoh
• Level 2
6.3*
Format sensor
for information
display
configuration
information configuration sensor ID, type,
data location 6.4
Generate alarm type
6.2* alarm
Assess signal
against alarm data
setup
telephone
6.1 sensor ID, type number
Read
sensors
sensor status
6.5*
Dial
phone telephone
number tones
20

Contoh
• Level 3 configuration
formated ID, sensor
information
type, 9
information
location Generate
6 display telephone
configuration Format
number tones
data display
sensor status
7
sensor ID, alarm type
Generate
type, location alarm
8
1 signal
Generate
Read 2 alarm data pulses to
sensors Acquire
3 line
response
sensor ID, type info Establish
4 tone ready
alarm
alarm cond. conditions Select telephone
list of phone 5 number
code, sensor
numbers number Set up
ID, timing
conn. to
information telephone
phone net
number
21

Contoh
• First Level Factoring
configuration
information
9
6
1
2 7
3
4
5 8

Monitor
sensors
executive

Sensor input Alarm conditions Alarm output


controller controller controller
22

Transform Mapping – Contoh


• Second level factoring
Monitor
sensors
executive

Sensor input Alarm conditions Alarm output


controller controller controller

Acquire Establish alarm Select phone Generate alarm Set up conn. to


Format display
response info conditions number signal phone net

Generate Generate pulses


Read sensors
display to line
23

Contoh
• Refine first iteration : Monitor sensors
Monitor
sensors
executive

Acquire Establish alarm Alarm output


response info conditions controller

Produce Generate Set up conn.


Read sensors display alarm signal to phone net

Generate
pulses to line

▪ Incoming controller dihapus : data input tunggal, cukup sederhana


▪ Transform controller dihapus dan digabung dalam satu modul : ada
penurunan tingkat kohesifitas
▪ Format display dan generate display digabung : sederhana
24

Transaction Mapping
• Langkah-langkah Transaction Mapping :
▪ Review dan refine DFD sampai ke level paling bawah
▪ Tentukan apakah DFD tsb. memiliki karakteristik tipe transform flow
atau transaction flow
▪ Tentukan batas antara incoming path/transaction, transaction center
dan action path
▪ Bangun first level factoring
▪ Bangun second level factoring
▪ Refine first iteration
• Contoh Transaction Mapping : SafeHome Security Software
25

Transaction Mapping
• Transaction structuring
Transaction
control
a
Reception
b d Dispatcher
path

b a c1

q r s
d
p
p

s
26

Transaction Mapping – Contoh


• DFD level 2 : User interaction
user commands raw
and data 7 configuration 8
Read data Build
1 configure configuration
Read user system configurat data
request
command data ion file
2
Invoke configuration
command
command information
type
processing
configuration configuration
5 data data
start stop
password Activate/d
eactivate A/D msg. 6
system Display
message
3 & status
Read
password four digits 4 display
Compare information
valid ID msg.
password
w/ file
27

Transaction Mapping – Contoh


• First/Second level factoring : User interaction
User
interaction
executive

Invoke
Read user
command
command
processing

System Password
Activate
configuration processing
/deactivate system
controller controller

Build configuration Display


Read system data Read password Compare
file messages &
password w/ file
status
28

Arsitektur SafeHome Security Software


SafeHome
Security
Monitor
sensors
executive
User
interaction Acquire Establish alarm Alarm output
executive response info conditions controller

Invoke Produce Generate alarm Set up conn. to


Read user Read sensors
command display signal phone net
command
processing

Generate
System Activate Password
pulses to line
configuration /deactivate processing
controller system controller

Build Display Compare


Read system data Read password
configuration file messages & password w/
status file
29

Terima Kasih
Ada Pertanyaan

Anda mungkin juga menyukai