Supporting Automatic Model Inconsistency Fixing Yingfei Xiong University of Tokyo, Japan Zhenjiang HuNational Institute of Informatics, Japan Haiyan ZhaoPeking.

Slides:



Advertisements
Similar presentations
A Method for Validating Software Security Constraints Filaret Ilas Matt Henry CS 527 Dr. O.J. Pilskalns.
Advertisements

Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Architecture Representation
A Context Analysis Method for Embedded Systems --- Exploring a Requirement Boundary between a System and Its Context Naoyasu Ubayashi(Kyushu University,
Page 1 Automatic Evaluation of Modelling Rules and Design Guidelines, July 2006 Automatic Evaluation of Modelling Rules and Design Guidelines Tibor Farkas,
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A Modified by Donghui Zhang.
1 Relational Algebra & Calculus. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
1 Evaluation of OCL for Large-Scale Modelling A Different View of the Mondex Smart Card Application Emine G. Aydal, Richard F. Paige, Jim Woodcock University.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Describing Syntax and Semantics
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Rutgers University Relational Algebra 198:541 Rutgers University.
Relational Algebra Chapter 4 - part I. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
CSCD343- Introduction to databases- A. Vaisman1 Relational Algebra.
Relational Algebra, R. Ramakrishnan and J. Gehrke (with additions by Ch. Eick) 1 Relational Algebra.
10 December, 2013 Katrin Heinze, Bundesbank CEN/WS XBRL CWA1: DPM Meta model CWA1Page 1.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
K. Jamroendararasame*, T. Matsuzaki, T. Suzuki, and T. Tokuda Department of Computer Science, Tokyo Institute of Technology, JAPAN Two Generators of Secure.
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Selection Control Structures Simple Program Design Third Edition A Step-by-Step Approach 4.
Verification and Validation in the Context of Domain-Specific Modelling Janne Merilinna.
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Beanbag: A Framework for On- Site Synchronization Yingfei Xiong (speaker), University of Tokyo Zhenjiang Hu, National Institute of Informatics / University.
A language to describe software texture in abstract design models and implementation.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Relational Algebra.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
Supporting Parallel Updates with Bidirectional Model Transformations Yingfei Xiong and Masato Takeichi University of Tokyo, Japan Song Hui Peking University,
1 Context-dependent Product Line Practice for Constructing Reliable Embedded Systems Naoyasu UbayashiKyushu University, Japan Shin NakajimaNational Institute.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Beanbag: Facilitating Model Inconsistency Fixing Yingfei Xiong Ph.D. Student Advisor: Zhenjiang Hu and Masato Takeichi University of Tokyo 1.
1 Relational Algebra & Calculus Chapter 4, Part A (Relational Algebra)
1 Relational Algebra and Calculas Chapter 4, Part A.
Database Management Systems 1 Raghu Ramakrishnan Relational Algebra Chpt 4 Xin Zhang.
Relational Algebra.
ICS 321 Fall 2011 The Relational Model of Data (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 8/29/20111Lipyeow.
1 Relational Algebra Chapter 4, Sections 4.1 – 4.2.
Beanbag: Operation-based Synchronization with Intra-Relation Support Yingfei Xiong Ph.D. Student University of Tokyo.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 4 Relational Algebra.
CSCD34-Data Management Systems - A. Vaisman1 Relational Algebra.
Database Management Systems, R. Ramakrishnan1 Relational Algebra Module 3, Lecture 1.
A Linguistic Approach to Model Synchronization Yingfei Xiong Ph.D., University of Tokyo Advisors: Zhenjiang Hu and Masato Takeichi 1.
Systems Analysis and Design in a Changing World, Fourth Edition
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
A UML-Based Pattern Specification Technique Presented by Chin-Yi Tsai IEEE TRANSACTION ON SOFTWARE ENGINEERING, VOL. 30, NO. 3, MARCH 2004 Robert B. France,
Dillon: CSE470: ANALYSIS1 Requirements l Specify functionality »model objects and resources »model behavior l Specify data interfaces »type, quantity,
On Combining Multi-formalism Knowledge to Select Models for Model Transformation Testing Sagar Sen (1 st year PhD student), Benoit Baudry, Jean-Marie Mottu.
CHESS Methodology and Tool Federico Ciccozzi MBEES Meeting Sälen, January 2011 January 2011.
11 Making Decisions in a Program Session 2.3. Session Overview  Introduce the idea of an algorithm  Show how a program can make logical decisions based.
Defects of UML Yang Yichuan. For the Presentation Something you know Instead of lots of new stuff. Cases Instead of Concepts. Methodology instead of the.
Deadlock Freedom by Construction
About the Presentations
Relational Algebra Chapter 4, Part A
Relational Algebra 461 The slides for this text are organized into chapters. This lecture covers relational algebra, from Chapter 4. The relational calculus.
Bo Wang1, Yingfei Xiong2, Zhenjiang Hu3, Haiyan Zhao1,
Beanbag : Support Synchronization in Software Engineering Applications
Towards Automatic Model Synchronization from Model Transformation
Relational Algebra Chapter 4, Sections 4.1 – 4.2
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Presentation transcript:

Supporting Automatic Model Inconsistency Fixing Yingfei Xiong University of Tokyo, Japan Zhenjiang HuNational Institute of Informatics, Japan Haiyan ZhaoPeking University, China Hui SongPeking University, China Masato TakeichiUniversity of Tokyo, Japan Hong MeiPeking University, China

Motivation Model software system often involves models with complex relations. Equal 2

Relation Description in OCL C1: context Message inv let rec = self.receiver in let ops = rec.base.operations in ops->exists(oper | oper.name = self.name) 3 Equal

Inconsistency Inconsistency will be caused when some part is updated by users choose 4 Not equal!

Inconsistency Fixing We need to propagate the updates to other part of the model to fix the inconsistency. choose 5

Existing Approaches Manual Fixing Procedures – By common programming languages [Grundy94] – By logic expressions [Finkelstein94, Straeten03] – Fully automated fixing, but requires considerable development cost Generating Fixing Actions from Consistency Relations – White box analysis [Egyed08] – Black box analysis [Nentwich03] – Fully automated development, but requires user intervention in fixing

Can we automatically derive fixing procedures from consistency relations? 7

Fixing Behavior Ambiguity A consistency relation may correspond to multiple fixing behaviors Need developers to tell the system which one to use C1: context Message inv let rec = self.receiver in let ops = rec.base.operations in ops->exists(oper | oper.name = self.name) choose choose() 8

Our Solution : Beanbag Beanbag – A language for specifying fixing behavior from consistency relation perspective – similar to OCL syntactically – has enriched constructs to describe a unique fixing behavior Every Beanbag Program has two types of semantics – Checking semantics for checking whether the relation is satisfied – Fixing semantics for fixing inconsistency by update propagation 9

Working Process of Beanbag Application Data Fixing Procedure Updates Beanbag Program Compile 10

Example 1 : A Simple Program def main(a, b, c) := a = b and b = c – input values: {a=1, b=1, c=1} – input updates: {a->2} – output updates: {a->2, b->2, c->2} a=1 b=1 c=1 2 22

Example 2: Customizing Fixing Behavior def main(obj1, obj2) := obj1."persistent" = true and obj2."name" = obj1."name" or obj1."persistent" = false and obj2 = null or obj1 = null and obj2 = null – input values: {obj1={name=Book, persistent=true}, obj2={name=Book}} – input updates: {obj2->null} – output updates: {obj1->{persistent->false}, obj2->null} obj1 name=Book persistent=true obj2 name=Book persistent=false

Example 2: Customizing Fixing Behavior def main(obj1, obj2) := obj1."persistent" = true and obj2."name" = obj1."name" or obj1 = null and obj2 = null or obj1."persistent" = false and obj2 = null – input values: {obj1={name=Book, persistent=true}, obj2={name=Book}} – input updates: {obj2->null} – output updates: {obj1->null, obj2->null} obj1 name=Book persistent=true obj2 name=Book

Example 3: the Running Example context Message inv let rec = self.receiver in let ops = rec.base.operations in ops->exists(oper | oper.name = self.name) def C1(msg, model) = let rec = model.(msg."receiver") in let opRefs = model.(rec."base")."operations" in opRefs->exists(opRef | model.opRef."name"=msg."name") OCL Beanbag 14

Overview: Constructs in Beanbag expr ::= variable | constant | expr.expr | not expr | expr=expr | expr and expr | expr or expr | expr->forall(v|expr) | expr->exists(v|expr) | expr->exists!(v|expr) 15

Overview: Enriched Constructs for Specifying Synchronization Behavior OCL ConstructsEnriched Constructs expr1=expr2 expr2=expr1 expr1 and expr2 expr2 and expr1 expr1 or expr2 expr2 or expr1 expr->exists(v | expr)expr->exists(v | expr) expr->exists!(v | expr) 16

The Fixing Semantics Consider an example: – Relation: a=b and b=c Basic relations (like a=b) Primitive fixing procedures Connectives (like and, or, forall) gluing their small fixing procedures into a bigger one 17 a=b b=c and

Primitive Fixing Procedures: a=b 18 a=2 b=2 3 3 a=2 b=2 3 3 a=2 b=2 3 3 a=2 b=2 3 4 report conflict a=b

Combinator a=b b=c and a=3 b=3 c=

Correctness Properties The fixing semantics of Beanbag is well- defined in the sense that it satisfies the following three properties – Consistency – Preservation – Stability 20

Consistency After fixing, the data always satisfy the consistency relation choose Equal 21

Preservation A fixing procedure does not overwrite user updates choose select 22

Stability If there is no update, the fixing procedure produces no update. 23

Evaluating the Expressiveness Steps – Collected 84 consistency relations from MOF standard, UML standard, and industry [Egyed07] – Identified requirements for 24 fixing procedures – Implementing these programs in Beanbag Result – Implemented 17 programs, 71% of all programs – The rest 7 programs can be implemented with small extensions to Beanbag 24

Implementation Beanbag has been implemented and published on the web Beanbag URL: – tokyo.ac.jp/~xiong/beanba g.html An old version has been used by several other research groups [RKK+09] 25 A graphic UML synchronization tool that is developed by University of Malaga using Beanbag

Conclusion Inconsistency fixing can be approached by a language – attaching fixing actions to primitive relations – gluing primitive relations by combinators The fixing behavior of the language is predictable as it satisfies the three properties The language is expressive as it can express many useful fixing behaviors in practice 26

Thank you for your attention! Beanbag URL:

What Relations are Suitable for Automatic Inconsistency Fixing Fixing actions need to be taken – obj.”name”=“SpecialName” Fixing is sensible without human intervention – No Circle Inheritance

What Small Extensions are Needed One program requires a new constraint without fixing action – A function count the number of entries in dictionary Other six programs require the ability to access key in forall All extensions conform to the basic idea of Beanbag – attaching fixing actions to primitive expressions, and composing them using high-level constructs.

Fixing Procedures Current approaches [Grundy94] provide automatic fixing through fixing procedures Fixing procedure: When a type of change occurs Do actions An example When a method in a class diagram is renamed Do find corresponding messages in sequence diagrams rename these messages 30

Fixing Behavior Customization def C1(msg, model) = let rec = model.(msg."receiver") in let opRefs = model.(rec."base")."operations" in opRefs->exists(opRef | model.opRef."name"=msg."name") choose choose()

Fixing Behavior Customization def C1(msg, model) = let rec = model.(msg."receiver") in let opRefs = model.(rec."base")."operations" in opRefs->exists!(opRef | model.opRef."name"=msg."name") choose