Multi-view Consistency Checking of BON Software Description Diagrams

26
Multi-view Consistency Checking of BON Software Description Diagrams Presented By: Yan Gao July 19, 2004

description

Multi-view Consistency Checking of BON Software Description Diagrams. Presented By: Yan Gao July 19 , 2004. Outline. Introduction. Conclusion & Future work. BON & BON metamodel. Constraints for multi-view consistency checking. The BCCT tool. New Design Method: CDD. Introduction. - PowerPoint PPT Presentation

Transcript of Multi-view Consistency Checking of BON Software Description Diagrams

Page 1: Multi-view Consistency Checking of  BON Software Description Diagrams

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

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

Introduction

Office

13 sq. m.

Missing window

Plan View

Elevation View

Page 4: Multi-view Consistency Checking of  BON Software Description Diagrams

Introduction

Model Consistency

Single-view Consistency

A

B

C

X

Page 5: Multi-view Consistency Checking of  BON Software Description Diagrams

Introduction

Model Consistency

Multi-view Consistency

Syntactic Consistency Contractual Consistency

Single-view Consistency

Page 6: Multi-view Consistency Checking of  BON Software Description Diagrams

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

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

BON & BON Metamodel

Model Language

Notation Metamodel

Page 9: Multi-view Consistency Checking of  BON Software Description Diagrams

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

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

– 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

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

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

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

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

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

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

The BCCT tool

Page 19: Multi-view Consistency Checking of  BON Software Description Diagrams

The BCCT Tool

Page 20: Multi-view Consistency Checking of  BON Software Description Diagrams

The BCCT Tool

Page 21: Multi-view Consistency Checking of  BON Software Description Diagrams

The BCCT Tool

Page 22: Multi-view Consistency Checking of  BON Software Description Diagrams

The BCCT Tool

Page 23: Multi-view Consistency Checking of  BON Software Description Diagrams

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

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

Future Work

• Automatic generation of testdrivers

• Specified Depth Algorithm

• BCCT tool

Page 26: Multi-view Consistency Checking of  BON Software Description Diagrams