Talents:Dynamically Composable    Units of ReuseJorge Ressia, Tudor Gîrba, Oscar Nierstrasz,     Fabrizio Perin and Lukas ...
Reuse
Mixins
Linear Composition
Single Composition
Traits
Class = Superclass + State + Traits +           Glue methods
Flatten Composition
MultipleComposition
Problem
moosetechnology.org
MooseEntity                                      FAMIXEntity                                                ...           ...
What about objects?
Talents
MooseEntity                                                                    FAMIXEntity                                ...
Operations
Define a method
jeeClassTalent      defineMethodNamed: #isTestClass      performing: ^ self inheritsFrom: #TestCase.
Exclude a method
jeeClassTalent      excludeMethodNamed: #isTestClass
Replace a method
jeeClassTalent      replaceMethodNamed: #isTestClass      performing: ^ self inheritsFrom: #TestCase.
Composition Operators
Composition
aClass := FAMIXClass new.aClass acquire: ( javaClassTalent , jeeClassTalent ).
Alias
aClass := FAMIXClass new.aClass acquire: javaClassTalent , ( jeeClassTalent    @ {#isTestClass -> #isJEETestClass})
Exclusion
aClass := FAMIXClass new.aClass acquire: javaClassTalent ,        (jeeClassTalent - #isTestClass).
Implementation
Reflection
scg.unibe.ch/research/        bifrost
Organize the Meta-level
ExplicitMeta-objects
Class         TalentObject
Class         TalentObject
Class              TalentTalented Object
Flattening
Scoping
Talentsscg.unibe.ch/research/talents
Talents Presentation at ESUG 2011
Talents Presentation at ESUG 2011
Talents Presentation at ESUG 2011
Upcoming SlideShare
Loading in...5
×

Talents Presentation at ESUG 2011

805

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
805
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • Since My Rectangle is a composition, I cannot access the behavior in MColor or MBorder exclusively.\nMixins have to be applied one at a time.\n
  • \n\n
  • Since My Rectangle is a composition, I cannot access the behavior in MColor or MBorder exclusively.\nMixins have to be applied one at a time.\n
  • \n
  • Since My Rectangle is a composition, I cannot access the behavior in MColor or MBorder exclusively.\nMixins have to be applied one at a time.\n
  • Originally in self\nthen developed by nathanel scharli in smalltalk.\nWith operations\n\n
  • Self traits do not provide composition operators.\n
  • Originally in self\nthen developed by nathanel scharli in smalltalk.\nWith operations\n\n
  • Originally in self\nthen developed by nathanel scharli in smalltalk.\nWith operations\n\n
  • \n
  • that it is a cool, large and open source platform for data and software analysis that is being increasingly used in industrial projects\n
  • Class oriented. Fixed on classes.\nClass explosion. \nGet the example from simon.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Another example will be the Simon one.\nTypically for a graph algorithm you have a graph structure which is built from Famix entities, yet nodes and edges require specific behavior and state to preserve algorithmic complexity.\nRight now we do some model transformations, that is we create the graph structure from the Famix model to run the algorithm with, then we can reflect on the graph or inject the result back into the Famix entities if necessary. But we need to create this disposable graph structure anyway.\nI always thought it would be much cooler to add behavior and state for graph computation directly into the Famix entities, run the algorithm, get the results, then remove such state and behavior from entities to preserve space. Especially this last point was not apparent in the Moose JEE example.\n
  • \n
  • \n
  • \n
  • We see that there are many different ways of doing reflection, adaptation, instrumentation, many are low level.\nAnd the ones that are highly flexible cannot break free from the limitations of the language.\n
  • Adaptation semantic abstraction for composing meta-level structure and behavior.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Talents Presentation at ESUG 2011

    1. 1. Talents:Dynamically Composable Units of ReuseJorge Ressia, Tudor Gîrba, Oscar Nierstrasz, Fabrizio Perin and Lukas Renggli www.scg.unibe.ch
    2. 2. Reuse
    3. 3. Mixins
    4. 4. Linear Composition
    5. 5. Single Composition
    6. 6. Traits
    7. 7. Class = Superclass + State + Traits + Glue methods
    8. 8. Flatten Composition
    9. 9. MultipleComposition
    10. 10. Problem
    11. 11. moosetechnology.org
    12. 12. MooseEntity FAMIXEntity ... FAMIXTypeaFAMIXClass isTestClass 2 FAMIXClass Key instance-of isTestClass 1 message send lookup aFAMIXClass self inheritsFrom: TestCase 3
    13. 13. What about objects?
    14. 14. Talents
    15. 15. MooseEntity FAMIXEntity ... 3 aJeeClassTalent FAMIXType talent isTestClass aJeeClassTalent FAMIXClassaFAMIXClass 2 inheritsFrom: TestCase 4 aFAMIXClass Key instance-of 1 message send lookup aFAMIXClass acquire isTestClass
    16. 16. Operations
    17. 17. Define a method
    18. 18. jeeClassTalent defineMethodNamed: #isTestClass performing: ^ self inheritsFrom: #TestCase.
    19. 19. Exclude a method
    20. 20. jeeClassTalent excludeMethodNamed: #isTestClass
    21. 21. Replace a method
    22. 22. jeeClassTalent replaceMethodNamed: #isTestClass performing: ^ self inheritsFrom: #TestCase.
    23. 23. Composition Operators
    24. 24. Composition
    25. 25. aClass := FAMIXClass new.aClass acquire: ( javaClassTalent , jeeClassTalent ).
    26. 26. Alias
    27. 27. aClass := FAMIXClass new.aClass acquire: javaClassTalent , ( jeeClassTalent @ {#isTestClass -> #isJEETestClass})
    28. 28. Exclusion
    29. 29. aClass := FAMIXClass new.aClass acquire: javaClassTalent , (jeeClassTalent - #isTestClass).
    30. 30. Implementation
    31. 31. Reflection
    32. 32. scg.unibe.ch/research/ bifrost
    33. 33. Organize the Meta-level
    34. 34. ExplicitMeta-objects
    35. 35. Class TalentObject
    36. 36. Class TalentObject
    37. 37. Class TalentTalented Object
    38. 38. Flattening
    39. 39. Scoping
    40. 40. Talentsscg.unibe.ch/research/talents
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×