Requirements Modeling Structured TIF-151551 REKAYASA DAN MANAJEMEN KEBUTUHAN
2 Goals Memahami konsep pemodelan terstruktur pada rekayasa kebutuhan. Terampil dalam pembuatan diagram-diagram yang diperlukan dalam pemodelan terstruktur pada rekayasa kebutuhan.
3 Konsep Dasar Pertama kali dipopulerkan oleh T. DeMarco (1979) Analysis and System Specification Structured Perluasan notasi untuk kebutuhan real-time systems oleh Hatley dan Pirbhai (1987) SA/RT Strategies for Real-Time System Specification Processes Data Behavior
4 Elemen-elemen Pemodelan Process Specification Data Flow (PSPEC) Diagram (DFD) Data Object Description ER Diagram Data Dictionary State Transition Diagram (STD) Control Specification (CSPEC)
5 Data Dictionary Representasi Simbol : = : composed of + : and {} : iterations of [. ] : selection / or () : optional : literal * * : comment/description Vend (partly) : Name Element Type object [coin slug]() data [ice cream coffee candy] data coins 0{[quarter nickel dime]}8 data available [TRUE FALSE] control [ YES NO ] quarter *25 cents US currency* coin return request [TRUE FALSE] control
6 Data Model ER Diagram Entitas (atribut dan nilai atribut) Modalitas : tingkat mandatory (minimal) Kardinalitas : tingkat relasi (maksimal) Bentuk relasi Manufacturer Builds Car
Data Model Data Object Description Data object represents a composite information consists of a number of different attributes or properties encapsulates data only no operation applied to its data can be external entity, thing, occurrence/event, role, organizational unit, structure, etc. e.g. dimensions (height, weight, depth), cars (make, model, ID, body type, color, owner) can be represented in a tabular representation 7
8 Process Model DFD 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
9 Process Model Elemen2 DFD Terminator Representasi entitas eksternal Customer Notasi: persegi panjang 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 Hubungkan terminator, process dan control bar control
Process Model Elemen2 DFD (contn d) Process Representasi aktifitas sistem Notasi: lingkaran 1 Proses A Memproses data Storage Representasi tempat penyimpanan data Notasi: dua garis paralel Data flow in = diubah, data flow out = dibaca Control bar Representasi spesifikasi kontrol Notasi: garis tegak data X 10
11 Process Model 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 Proses pemodelan DFD/CFD adalah proses iterasi, tidak sekali jadi Penjenjangan CFD harus sesuai dengan DFD
12 Data Control Identification Identify data first rather than control controlling first to know what you are Continuous signals, and processes that act on them, are always categorized as data Discrete signals, and processes that act on them, are usually categorized as control Terms like activate, turn on, engage and execute are usually associated with control requirements
Process Model DFD/CFD Leveling Must be consistent 13
14 Examples Vending Machine System
Data/Control Context Diagram (DCD/CCD) object 15 returned coins 0* Customer customer selection Vend slug coin return request Customer available
16 Data/Control Flow Diagram (DFD/CFD Level 1) object slug coin return request coins 1* Get customer payment payment sufficient payment coin detected price table 2p Get price returned coins 5* Dispense change change due 3p Validate payment price valid selection available 4p Get valid selection customer selection 6p Dispense valid selection available s dispensed
Data/Control Flow Diagram (DFD/CFD Level 2) 17 DFD/CFD level 2 : Dispense change coin return request available change due 5.1p Get change coin returned coins change coins coins payment 5.2p Get payment coin payment coins
Process Model Process Specification (PSPEC) PSPEC Validate payment (Process 3) 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 18
19 Behavior Model CSPEC Dispense change : Process Activation Table (PAT) coin return request available get change coin get payment coin TRUE TRUE 1 0 D/C FALSE 0 1
20 Behavior Model (contn d) State Transition Diagram (STD) initial accept new coin Waiting for a coin payment returned coin detected dispensed accept new coin accept customer request coin return request return payment Returning payment Waiting for selection sufficient payment dispense Dispensing accept new coin available=false return payment