R O O T S Conditional Transformations Fabian Noth

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Substitution.
Slide 1 Insert your own content. Slide 2 Insert your own content.
1 Classes and Objects in Java Basics of Classes in Java.
Basic Java Constructs and Data Types – Nuts and Bolts
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 3.1 Chapter 3.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 4 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
List and Search Grants Chapter 2. List and Search Grants 2-2 Objectives Understand the option My Grants List Grant Screen Viewing a Grant Understand the.
0 - 0.
ALGEBRAIC EXPRESSIONS
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
ALGEBRAIC EXPRESSIONS
ZMQS ZMQS
Bounded-depth circuits: Separating wires from gates Michal Koucký Joint work with: Pavel Pudlák and Denis Thérien.
Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
Chapter 17 Linked Lists.
Linked Lists.
Data Structures ADT List
ADTs unsorted List and Sorted List
ABC Technology Project
1 / / / /. 2 (Object) (Object) –, 10 (Class) (Class) –, –, – (Variables) [ Data member Field Attribute](, ) – (Function) [ Member function Method Operation.
O X Click on Number next to person for a question.
© S Haughton more than 3?
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
Progam.-(6)* Write a program to Display series of Leaner, Even and odd using by LOOP command and Direct Offset address. Design by : sir Masood.
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Twenty Questions Subject: Twenty Questions
Take from Ten First Subtraction Strategy -9 Click on a number below to go directly to that type of subtraction problems
Linking Verb? Action Verb or. Question 1 Define the term: action verb.
Created by Susan Neal $100 Fractions Addition Fractions Subtraction Fractions Multiplication Fractions Division General $200 $300 $400 $500 $100 $200.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
User Query Control An Enhancement For AS/400 Query On The IBM iSeries from  Copyright I/O International, 2005 Skip Intro.
Limits (Algebraic) Calculus Fall, What can we do with limits?
Properties of Exponents
Chapter 5 Test Review Sections 5-1 through 5-4.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Doubles Facts Doubles with Pictures Doubles without Pictures Pictures Only.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
We will resume in: 25 Minutes.
1 Ke – Kitchen Elements Newport Ave. – Lot 13 Bethesda, MD.
1 Unit 1 Kinematics Chapter 1 Day
O X Click on Number next to person for a question.
Chapter 13 – Introduction to Classes
How Cells Obtain Energy from Food
Leo Lam © Signals and Systems EE235. Leo Lam © Breeding What do you get when you cross an elephant and a zebra? Elephant zebra sin.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14: More About Classes.
Copyright © 2012 Pearson Education, Inc. Chapter 14: More About Classes.
Chapter 10 Ch 1 – Introduction to Computers and Java Streams and File IO 1.
R O O T S Interprocedural Analysis Aleksandra Biresev
1 JTransformer Framework Tobias Windeln Institut für Informatik III Rheinische Friedrich-Wilhelms-Universität Bonn.
Relational Operator and Operations
Presentation transcript:

R O O T S Conditional Transformations Fabian Noth

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 2 R O O T S What are Conditional Transformations? Combining analysis and transformations on programs (nearly) every transformation requires an analysis Based on logic Program as logic factbase Uniformity Independecy from underlying system (e.g. java source code) Complex sequences Combination of simple CT

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 3 R O O T S Source codeFactbase Program as logic factbase class A { public int a; private double b; float c; void m(int i) { m(i); } class B { public int j; private int k; public boolean b; } classT(1,0,'A',[2,3,4,5]) fieldT(2,1,int,'a') modifierT(2, public') fieldT(3,1,double,'b') modifierT(3, 'private') fieldT(4,1,float,'c') modifierT(4, 'package') methodT(5,1,'m',[6],void, 7) paramT(6,5,int,'i') blockT(7,5)... classT(12,0,'B',[13,14,15]) fieldT(13,12,int,'j') modifierT(13, 'public') fieldT(14,12,int,'k') modifierT(14, 'private') fieldT(15,12,boolean,'b') modifierT(15, 'public')

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 4 R O O T S Conditional Transformation Program as logic factbase Evaluate if the condition is true Analysing the factbase Propagation of valid substitutions (IDs) Creation of missing IDs Propagation of all required IDs for Transformation Changing the factbase Transformation ID-Creation Condition

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 5 R O O T S Example: copyFields 1 ct( copyField( SrcClass, SrcField, Ftype, Fname, TargetClass, TargetField), 2 condition ( ( 3 fieldT(SrcField, SrcClass, Ftype, Fname, _), 4 not( fieldT(_,TargetClass, _, Fname, _) ), 5 modifierT(SrcField, Mod) 6 ) ), 7 idcreation ( ( 8 new_node_id(TargetField) 9 ) ), 10 transformation ( ( 11 add(fieldT(TargetField, TargetClass, Ftype, Fname, null)), 12 add(modifierT(TargetField, Mod)), 13 add_to_class(TargetClass, TargetField) 14 )) 15 ). Transformation ID-Creation Condition

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 6 R O O T S ConditionFactbase Evaluating the condition Substitution Set SrcClassTarget Class SrcFieldFtypeFnameMod 1122intapublic 1124floatcpackage classT(1,0,'A',[2,3,4,5]) fieldT(2,1,int,'a') modifierT(2, public') fieldT(3,1,double,'b') modifierT(3, 'private') fieldT(4,1,float,'c') modifierT(4, 'package')... classT(12,0,'B',[13,14,15]) fieldT(13,12,int,'j') modifierT(13, 'public') fieldT(14,12,int,'k') modifierT(14, 'private') fieldT(15,12,boolean,'b') modifierT(15, 'public') condition ( ( fieldT(SrcField,SrcClass, Ftype, Fname, _), not( fieldT(_,TargetClass, _, Fname, _) ), modifierT(SrcField, Mod) ) ), Input: SrcClass = 1, TargetClass = 12

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 7 R O O T S ID-Creation No unbound variables are allowed in the transformation Variables which are not bound in the condition have to be bound in the ID-Creation new_node_id(Var) -Command Creates new, unique ID Binds variable Var to this ID For each substitution skip -Command If all variables are bound in the condition TargetField idcreation ( ( new_node_id(TargetField) )... +

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 8 R O O T S Transformation Transformation = Combination of: add delete replace Prolog predicates (e.g add_to_class ) transformation ( ( add(fieldT(TargetField, TargetClass, Ftype, Fname, null)), add(modifierT(TargetField, Mod)), add_to_class(TargetClass, TargetField) ))... classT(12,0,'B',[13,14,15])... classT(12,0,'B',[13,14,15, 16, 17]) fieldT(16,12,int,'a') modifierT(16, public') fieldT(17,12,float,'c') modifierT(17, 'package')...

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 9 R O O T S Blackbox 1 ct( copyField( SrcClass, SrcField, Ftype, Fname, TargetClass, TargetField), 2 condition ( ( 3 fieldT(SrcField, SrcClass, Ftype, Fname, _), 4 not( fieldT(_,TargetClass, _, Fname, _) ), 5 modifierT(SrcField, Mod) 6 ) ), 7 idcreation ( ( 8 new_node_id(TargetField) 9 ) ), 10 transformation ( ( 11 add(fieldT(TargetField, TargetClass, Ftype, Fname, null)), 12 add(modifierT(TargetField, Mod)), 13 add_to_class(TargetClass, TargetField) 14 )) 15 ). Transformation ID-Creation Condition copyField( SrcClass, SrcField, Ftype, Fname, TargetClass, TargetField)

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 10 R O O T S Blackbox copyField i-1 i

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 11 R O O T S Sequences Copy all possible fields Encapsulate all possible fields No matter if it is a copied field or not ctseq( copyAndEncapsulateFields_Or(SrcClass,SrcField,TargetClass,TargetField), orseq( ct(copyField(SourceClass,SourceField,FType,Fname,TargetClass,TargetField)), ct(encapsulateField(SourceField)) ) ). i-1 Copy i Encapsulate i+1

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 12 R O O T S Sequences Copy all fields Encapsulate only copied fields ctseq( copyAndEncapsulateFields_Prop(SrcClass,SrcField,TargetClass,TargetField), propseq( ct(copyField(SourceClass,SourceField,FType,Fname,TargetClass,TargetField)), ct(encapsulateField(SourceField)) ) ). i-1 Copy Encapsulate i+1 i

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 13 R O O T S Sequences Copy only encapsulatable fields Encapsulate only copied fields ctseq( copyAndEncapsulateFields_And(SrcClass,SrcField,TargetClass,TargetField), andseq( ct(copyField(SourceClass,SourceField,FType,Fname,TargetClass,TargetField)), ct(encapsulateField(SourceField)) ) ). i-1 Copy i Encapsulate i+1 Undo Copy negprop

Modellbasierte Softwareanalyse, 2010/2011Conditional Transformations 14 R O O T S CTs in Action CT-Example in Eclipse Copy fields Example for use of sequences