![Page 1: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/1.jpg)
Multi-view Consistency Checking of
BON Software Description Diagrams
Presented By:
Yan Gao
July 19, 2004
![Page 2: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/2.jpg)
Outline
• Conclusion & Future work
• Introduction
• BON & BON metamodel
• Constraints for multi-view consistency checking
• The BCCT tool
• New Design Method: CDD
![Page 3: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/3.jpg)
Introduction
Office
13 sq. m.
Missing window
Plan View
Elevation View
![Page 4: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/4.jpg)
Introduction
Model Consistency
Single-view Consistency
A
B
C
X
![Page 5: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/5.jpg)
Introduction
Model Consistency
Multi-view Consistency
Syntactic Consistency Contractual Consistency
Single-view Consistency
![Page 6: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/6.jpg)
Approaches to multi-view consistency
• Formal
• Mainly Informal e.g. [Glintz 2000]
• Minimize overlap
• Systematically cross-reference corresponding information
• Includes syntactic and contractual consistency
• Based on a metamodel
• ROOM4[2002] UKTEST [2003]
• Paige and Ostroff
![Page 7: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/7.jpg)
Approaches to multi-view consistency
• Our work
• Based on ROOM4 & UKTEST
• Modify the metamodel
• Develop prototype tool
• First tool to formally check multi-view consistency with contracts
• [Krishnan 2000] extends ROOM4 to UML and OCL
![Page 8: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/8.jpg)
BON & BON Metamodel
Model Language
Notation Metamodel
![Page 9: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/9.jpg)
BON
ROOT_CLASS CUSTOMER
TRANSACTION ACCOUNT
DEPOSIT_TRANSACTION
c1
a1
account
customert
transaction:List[..]
ROOT_CLASS(root)
CUSTOMER(customer)
ACCOUNT(account)
DEPOSIT_TRANSACTION(deposit_transaction)
TRANSACTION(transaction)
1
2,4
3
2.1
2.2
3.1
Static Diagram (SD) Dynamic Diagram (DD)
Scenario: deposit1 create customer c12 create account a1 with c12.1 create transaction list transactions2.2 set customer’s account to a13 create a deposit transaction t for account a1 of $1003.1 add transaction t to transactions4 check balance
![Page 10: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/10.jpg)
BON Metamodel
MODEL VIEW
VIEWS
STATIC_DIAGRAM DYNAMIC_DIAGRAM
ABSTRACTIONS RELATIONSHIPS
abs:SET[..] rel:SET[..]
OTHERS
vs:SET[..] CODE
![Page 11: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/11.jpg)
– messages-invokable
Constraints for multi-view consistency checking
Syntactic Consistency
• consistency(v1,v2)
– object-class
– message-feature
– contractual-consistency
![Page 12: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/12.jpg)
Object-Class
A B a b
Each object in the Dynamic Diagram (e.g. a) has a corresponding class in the Static Diagram (e.g. A)
![Page 13: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/13.jpg)
Message-Feature
A(a)
B(b)
Each message, such as m in the DD, has to be invoked by a routine f1 in the source class A in the SD which makes a call to feature f2 in the target class B.
A…f1 isdo … b.f2 …end…
B…f2 isdo …end…
mf1 f2b
![Page 14: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/14.jpg)
Contractual-consistency
A B A(a)
B(b)
• Check that there is at least one execution of the message sequence m1; m2 in the DD that can be executed without the contracts in the SD being violated, e.g. r1.post implies r2.pre.
• Generate code automatically and run TestDriver• Consistent if TestDriver runs without contract
violations.
m1, m2
![Page 15: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/15.jpg)
Messages-invokable
A
r isdo
b.a.b.a.b.c.f end
C
f
B
b
ac
A(a)
C(c)
1 Scenario1: a sends message m to c
Specified depth algorithm
![Page 16: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/16.jpg)
Algorithms for multi-view consistency checking
Algorithm 4-1
Algorithm 4-2
Algorithm 4-3
(generate code)
Algorithm 5-4
(Specified Depth) The BON Consistency
Checking Tool
![Page 17: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/17.jpg)
The BCCT Tool
• A BON Diagram Editor.
• A BON Diagram Parser.
• A Consistency
Checker. • A Code
Generator.
![Page 18: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/18.jpg)
The BCCT tool
![Page 19: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/19.jpg)
The BCCT Tool
![Page 20: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/20.jpg)
The BCCT Tool
![Page 21: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/21.jpg)
The BCCT Tool
![Page 22: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/22.jpg)
The BCCT Tool
![Page 23: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/23.jpg)
Consistency Driven Development
• Refactor the model to get the consistency check to pass, and re-run the checks.
• Run the consistency checks (which will usually fail as the model is incomplete or inconsistent);
• Construct some small part of the model;
![Page 24: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/24.jpg)
Conclusion
• Formalized the notion consistency(v1,v2)
• Developed algorithms to check consistency
• Incorporated these algorithms into BCCT – A graphical editor
– Check Syntactic consistency automatically
– Translate the model to executable Eiffel Code• A new design method: CDD
![Page 25: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/25.jpg)
Future Work
• Automatic generation of testdrivers
• Specified Depth Algorithm
• BCCT tool
![Page 26: Multi-view Consistency Checking of BON Software Description Diagrams](https://reader036.vdocument.in/reader036/viewer/2022062519/568150f1550346895dbf0b73/html5/thumbnails/26.jpg)