Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Object Flow Analysis

on

  • 432 views

Object Flow Analysis -- Taking an Object-centricView on Dynamic Analysis. Adrian Lienhard. ESUG 2007, Lugano

Object Flow Analysis -- Taking an Object-centricView on Dynamic Analysis. Adrian Lienhard. ESUG 2007, Lugano

Statistics

Views

Total Views
432
Views on SlideShare
432
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Object Flow Analysis Object Flow Analysis Presentation Transcript

  • Object Flow Analysis – Taking an Object-centric View on Dynamic Analysis Adrian Lienhard1, Stéphane Ducasse2 and Tudor Gîrba1 1Software Composition Group, University of Bern, Switzerland 2 LISTIC, University of Savoie, France
  • A missing aspect of OO dynamic analysis Typical characterization of OO program execution: 1) message passing 2) object interrelationships How are objects passed throught the system? Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 1) the method execution perspective MethodNode>>generate ASTTranslator class>>new ... ... IRBuilder>>initialize IRMethod class>>new ... ASTTranslator>>visitNode: ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 1) the method execution perspective MethodNode>>generate ASTTranslator class>>new ... ... IRBuilder>>initialize “How is the IRMethod IRMethod class>>new instance passed to ? ... ASTTranslator>>visitNode: MethodNode?” ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 2) the object interrelationship perspective :IRMethod :MethodNode :IRBuilder :IRSequence :ASTTranslator Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 2) the object interrelationship perspective ? “How is the IRMethod :IRMethod :MethodNode instance passed to MethodNode?” :IRBuilder :IRSequence :ASTTranslator Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • MethodNode>>generate ASTTranslator class>>new ... ? ... :IRMethod :MethodNode IRBuilder>>initialize IRMethod class>>new ? ... ASTTranslator>>visitNode: interdependency? :IRBuilder :IRSequence ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new :ASTTranslator Object Flow Analysis track the transfer of object references Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Object Flow IRBuilder>>initialize ir := IRMethod new. instantiation field store Analysis ... IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read IRSequence>>method: aMethod argument method := aMethod. field store ASTTranslator>>ir a) capture all ^ builder ir. return references of an MethodNode>>generate object ast := ASTTranslator new visitNode: self. ir := ast ir. return ^ ir compiledMethod. field store field read b) track the IRMethod>>compiledMethod ^ compiledMethod := IRTranslator new transfer of interpret: self; compiledMethod. references IRTranslator>>interpret: ir argument ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Object Flow IRBuilder>>initialize ir := IRMethod new. instantiation instantiation field write field write Analysis ... IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read IRSequence>>method: aMethod argument method := aMethod. field write ASTTranslator>>ir a) capture all ^ builder ir. return return references of an MethodNode>>generate object ast := ASTTranslator new visitNode: self. ir := ast ir. return return ^ ir compiledMethod. field write field write field read field read b) track the IRMethod>>compiledMethod ^ compiledMethod := IRTranslator new transfer of interpret: self; compiledMethod. references IRTranslator>>interpret: ir argumentargument ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Object Flow IRBuilder>>initialize ir := IRMethod new. instantiation instantiation field store write field write 1 Analysis ... 1 IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read 2 2 IRSequence>>method: aMethod argument method := aMethod. field write store “How is the IRMethod ASTTranslator>>ir ^ builder ir. return return instance passed to 3 MethodNode>>generate 3 MethodNode?” ast := ASTTranslator new visitNode: self. ir := ast ir. return return ^ ir compiledMethod. field write field write store field read field read IRMethod>>compiledMethod ^ compiledMethod := IRTranslator new interpret: self; compiledMethod. IRTranslator>>interpret: ir argumentargument ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Application How do classes exchange objects? Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Inter-unit flow view classes containedInPackage: ’AST-Nodes’ mapTo: ’AST’. classes hierarchyRootedIn: ’IRInstruction’ mapTo: ’Intermediate-Representation’ Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Chronological propagation Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Parser (4) Spanning flows Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Spanning flows IRBuilder Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • objects created in objects passed IRBuilder through directly objects passed out multiple times objects stored in an instance variable timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Representing object flows IRBuilder>>initialize instantiation ir := IRMethod new. ... field store write IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read IRSequence>>method: aMethod argument method := aMethod. field write store ASTTranslator>>ir ^ builder ir. return MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Representing object flows IRBuilder>>initialize instantiation ir := IRMethod new. Instance ... field store write IRBuilder>>startNewSequence newSequence := IRSequence new. field read parent newSequence method: ir. 0..1 Alias IRSequence>>method: aMethod argument * method := aMethod. field store write child ASTTranslator>>ir ^ builder ir. return MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Representing object flows instantiation Instance field store write ce nce new. field read parent 0..1 Alias hod argument * field store write child return ... ArgumentAlias ReturnAlias FieldWriteAlias isitNode: self. return field store field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Representing object flows stantiation Instance Class field store write sender parent 0..1 * read receiver 0..1 Activation Alias Method ument * write store creator child Attribute return ... ArgumentAlias ReturnAlias FieldWriteAlias return field store field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • Summary IRBuilder>>initialize instantiation ir := IRMethod new. Instance Class ... field store write IRBuilder>>startNewSequence sender newSequence := IRSequence new. 0..1 field read parent * newSequence method: ir. 0..1 receiver Alias Activation Method IRSequence>>method: aMethod argument * method := aMethod. field store write creator child Attribute ASTTranslator>>ir ^ builder ir. return ... ArgumentAlias ReturnAlias FieldWriteAlias MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Questions? Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch