Multiview Consistency Checking of BON Software Description Diagrams
Multi-view Consistency Checking of BON Software Description Diagrams Presented By: Yan Gao July 19, 2004
Outline • Introduction • BON & BON metamodel • Constraints for multi-view consistency checking • The BCCT tool • New Design Method: CDD • Conclusion & Future work
Introduction
Introduction Model Consistency A Single-view Consistency B C X
Introduction Model Consistency Single-view Consistency Multi-view Consistency Syntactic Consistency Contractual Consistency
Approaches to multi-view consistency • Mainly Informal e. g. [Glintz 2000] • Minimize overlap • Systematically cross-reference corresponding information • Formal • Paige and Ostroff • Includes syntactic and contractual consistency • Based on a metamodel • ROOM 4[2002] UKTEST [2003]
Approaches to multi-view consistency • [Krishnan 2000] extends ROOM 4 to UML and OCL • Our work • Based on ROOM 4 & UKTEST • Modify the metamodel • Develop prototype tool • First tool to formally check multi-view consistency with contracts
BON & BON Metamodel Model Language Notation Metamodel
BON ROOT_CLASS (root) ROOT_CLASS c 1 customer TRANSACTION CUSTOMER account a 1 t 1 ACCOUNT CUSTOMER (customer) 3 2, 4 2. 2 ACCOUNT (account) 2. 1 DEPOSIT_TRANSACTION (deposit_transaction) 3. 1 transaction: List[. . ] TRANSACTION (transaction) DEPOSIT_TRANSACTION Static Diagram (SD) Dynamic Diagram (DD)
BON Metamodel
Constraints for multi-view consistency checking • consistency(v 1, v 2) – object-class – message-feature – messages-invokable – contractual-consistency Syntactic Consistency
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)
Message-Feature A … f 1 is do … b. f 2 … end … b B … f 2 is do … end … A (a) m f 1 f 2 B (b) Each message, such as m in the DD, has to be invoked by a routine f 1 in the source class A in the SD which makes a call to feature f 2 in the target class B.
Contractual-consistency A • • • B A (a) m 1, m 2 B (b) Check that there is at least one execution of the message sequence m 1; m 2 in the DD that can be executed without the contracts in the SD being violated, e. g. r 1. post implies r 2. pre. Generate code automatically and run Test. Driver Consistent if Test. Driver runs without contract violations.
Messages-invokable Specified depth algorithm
Algorithms for multi-view consistency checking Algorithm 4 -1 Algorithm 4 -2 Algorithm 5 -4 (Specified Depth) Algorithm 4 -3 (generate code) The BON Consistency Checking Tool
The BCCT Tool • A BON Diagram Editor. • A BON Diagram Parser. • A Consistency Checker. • A Code Generator.
The BCCT tool
The BCCT Tool
The BCCT Tool
The BCCT Tool
The BCCT Tool
Consistency Driven Development • Construct some small part of the model; • Run the consistency checks (which will usually fail as the model is incomplete or inconsistent); • Refactor the model to get the consistency check to pass, and re-run the checks.
Conclusion • Formalized the notion consistency(v 1, v 2) • 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
Future Work • Automatic generation of testdrivers • Specified Depth Algorithm • BCCT tool
- Slides: 26