SLIDE 1 RMCode: Automatic Prototyping from Requirement Model
Yilong Yang
http://lab.mydreamy.net yylonly@gmail.com Software Engineering Lab
SLIDE 2 Preliminary
- Use Case Diagram
- System Sequence Diagram / Activity Diagram
- Conceptual Class Diagram
- Operation Contract
Requirement Model
SLIDE 3 Requirement Model
- The responsibilities of the target system includes knowing
responsibilities and doing responsibilities.
- Knowing responsibilities of the target system are specified by
the conceptual class diagram.
- Doing responsibilities are specified by activity diagrams or
system sequence diagrams for use cases in the use case diagram.
- Contract of doing responsibility not only contains the
signatures of operation but also pre and post conditions of
- peration for fulfilling the responsibility
SLIDE 4 Motivation
- Requirement errors mostly lead to the failures of software
development.
- Customers and end-user are not entirely sure of what is
needed before trying out the target software.
- It is very desirable to have a tool to generate prototypes
directly from requirements automatically.
SLIDE 5 State-of-arts
- Current UML modeling tools can only generate skeleton
code, the operations still need to be manually implemented.
- Even if providing a design model to each operation, only
less than 48% correct source code can be generated.
SLIDE 6 RMCode: Requirement Modeler and Code Generator
- RMCode can automatic generate object-oriented
prototype from UML requirement model.
- Generated prototype can be used for validating the
requirements and eliciting more requirements.
SLIDE 7
Case Study I CoCoME (Supermarket System)
SLIDE 8
Use Case Diagram
SLIDE 9 System Interactions
Activity Diagram System Sequence Diagram
SLIDE 10
Doing responsibilities
SLIDE 11
Conceputal Class Diagram
SLIDE 12
Operation Contract
SLIDE 13
Requirement Model in RMCode
SLIDE 14
Generate Prototype
SLIDE 15
Prototype: System Operations
SLIDE 16
Prototype: System Status
SLIDE 17
Generate CRUD Operations
SLIDE 18
Loading or adding start-up data
SLIDE 19
Start-up Data: UM Store
SLIDE 20
Start-up data: Item Apple
SLIDE 21
Validate ProcessSale
SLIDE 22
Validate ProcessSale
SLIDE 23
Refined Requirement Model
SLIDE 24 OpenCashDesk
CashDesk1 Status:
SLIDE 25
ProcessSale - makeNewSale
SLIDE 26 ProcessSale - enterItem
Input Variables:
SLIDE 27
ProcessSale - enterItem
SLIDE 28
execute enterItem before makeNewSale
SLIDE 29
ProcessSale - endSale
SLIDE 30
ProcessSale - endSale
SLIDE 31
ProcessSale - makeCashPayment
SLIDE 32
ProcessSale - makeCashPayment
SLIDE 33 Requirement Validation
If we miss this condition
SLIDE 34 Requirement Validation
Sale Status After executing of enterItem (we need to pay 100 MOP)
SLIDE 35 Requirement Validation
System Status After executing of CashPayment with only 80 payment CashPayment Invariant is not holding at this moment
SLIDE 36 Next Step
- We specified main functionality about Cashier about
checking out.
- We did not touch storage management yet….
SLIDE 37
Refined Requirement Model
SLIDE 38
UseCase: OrderProducts
SLIDE 39
Refining Conceptual Class Diagram
SLIDE 40
showStockReports
SLIDE 41
showStockReports
SLIDE 42
changePrice
SLIDE 43
changePrice
SLIDE 44
After checking out this two surface laptop
SLIDE 45
makeNewOrder
SLIDE 46 Listing out of stock products
Bug? Let`s check post-condition Should be item.StockNumber = 0
SLIDE 47 Fixing error requirement, re- generation, and running prototype
Bug? Let`s check post-condition Should be item.StockNumber = 0
SLIDE 48
Fixing error requirement, re- generation, and running prototype
SLIDE 49
Executing orderItem
SLIDE 50
List suppliers and choose one
SLIDE 51
Place Order
SLIDE 52
Place Order
SLIDE 53
Receive Ordered Products
SLIDE 54 CoCoME (Supermarket System)
- UML requirement model
- Refine UML requirement model in RMCode
- Validate and fix requirements
SLIDE 55
Case Study II UM Library Management System
SLIDE 56
Use Case Diagram
SLIDE 57
Use Case Diagram
SLIDE 58
SLIDE 59
SLIDE 60
The contract of borrowBook
SLIDE 61
SLIDE 62
SLIDE 63
The contract of renewBook
SLIDE 64
The contract of renewBook
SLIDE 65
The contract of renewBook
SLIDE 66
The contract of returnBook
SLIDE 67
The contract of returnBook
SLIDE 68
The contract of dueSoonNotification
SLIDE 69
The contract of makeReservation
SLIDE 70
The contract of makeReservation
SLIDE 71
Prototype Functionality
SLIDE 72
Prototype Status
SLIDE 73 RMCode
- RMCode is a good UML requirement modelling tool
- RMCode provides an evolutionary approach to validate the
requirement
- Good for training your mind as like project manager
SLIDE 74 Contribute to RMCode
- Download RMCode from
- http://lab.mydreamy.net
- Try the provided case studies from GitHub
- https://github.com/yylonly/RMCodeCaseStudies.git
- Create new case studies, then make a pull request
- Open a new issue on GitHub, if bugs were found.
SLIDE 75 Contribute to RMCode
- Full-stack JavaScript Web Application
- Java EE Application
- Android/IOS Application
If you are interested in the development of :
SLIDE 76
Thank You