Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Towards easy program migration using language virtualization

Talk from IWST at ESUG19, Cologne, Germany

  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Towards easy program migration using language virtualization

  1. 1. Towards easy program migration using language virtualization 1 Théo Rogliano, Pablo Tesone, Guille Polito
  2. 2. Agenda 1.Motivation: reusing old libraries in new versions of the language 2.Our approach: Virtualization-inspired language compatibility 3.Techniques for language virtualization: overcoming the challenges 4.Validating our virtualization approach 5.Future and conclusion 2
  3. 3. Reusing libraries between two versions of the language 3 Library Pharo 2 (2012) Pharo 7 (2018) Motivation
  4. 4. Problems of old libraries in new language versions Examples of language changes that break programs: - Syntax changes. - Standard library changes (public classes, APIs). - Other examples: Meta-model changes, compiler semantics changes. 4 var _ 17. var := 17. method getSource. method sourceCode. Motivation
  5. 5. Virtualization-inspired language compatibility 5 Pharo 2 (2012) Pharo 7 (2018) Library Library Pharo 2 => Pharo 7 Hypervisor Our approach
  6. 6. Reusable compatibility layer 6 Pharo 2 (2012) Pharo 7 (2018) Library Library Pharo 2 => Pharo 7 Hypervisor Another Library Another Library Our approach
  7. 7. Research question: how do we build a compatibility layer ? 7 Pharo 7 (2018) Library Pharo 2 => Pharo 7 Another Library
  8. 8. Challenges of language virtualization 8
  9. 9. Challenges of language virtualization 9
  10. 10. Challenges of language virtualization 10
  11. 11. Techniques for language virtualization ● Kernel indirection. ● Dynamic code rewriting ● Modules for isolation 11
  12. 12. Kernel Indirection Entity with the same name we expect exists, we reuse it with inheritance. 12 Techniques for language virtualization
  13. 13. Solving incompatibilities with inheritance 13 2012 2018 Techniques for language virtualization
  14. 14. Solving name conflicts with modules Same name allowed in different modules. 14 Techniques for language virtualization
  15. 15. Dynamic code rewriting Kernel indirection is not enough. 15 Techniques for language virtualization
  16. 16. Solving incompatibilities through code rewritings Transparent for the library. Rewriting done through AST annotations. 16 method getSource. method sourceCode. bytecode transformation Techniques for language virtualization
  17. 17. Retrieve missing behavior -Retrieve old behavior if we have an archive. -Assume behavior and code it (TDD). 17 Techniques for language virtualization
  18. 18. Solving missing classes with late class creation ColorPoint cannot be created without its superclass Point. 18 Introduced a class AST to analyse it before class creation -Detection of missing references. -React to the missing references (modify the class creation). ? Techniques for language virtualization
  19. 19. Validation We execute old Pharo programs in a newer version of Pharo with a hypervisor. Hypothesis: the program had all tests passing in the old version. Goal: make those tests pass in the newer version with the hypervisor. /! It does not mean the program is working (low test coverage) 19
  20. 20. Scenario1: Mutalk Virtualizer strategies created with this scenario. -45 missing entities -37 reimplemented in hypervisor -355/362 tests passing 20 -8 remainings missing entities are for graphical behaviors or not tested -7 failing tests are linked to the 8 remainings missing entities
  21. 21. Scenario (Bonus): NesTalk 21 Show time !!
  22. 22. Scenario 2: Fuel -79 missing entities -67 reimplemented in hypervisor + stream compatibility -19/239 tests passing 22 We encountered new challenges: - Fuel assumes a single global environment - The compatibility layer is not hidden to reflective operations - Extension methods needs to be scoped to the compatibility layer or library
  23. 23. Future work Compatibility layer superposition? 23 Last Pharo version Compatibility Pharo 3 Compatibility Pharo 2 Compatibility Pharo 1 A compatibility layer with another language? Relation with PharoGs? ………... Library in C Compatibility C Last Pharo version
  24. 24. Conclusion Language changes cause compatibility problems. We propose a compatibility layer between different pharo versions. We validate our approach by running old applications in new versions. We discover new challenges to overcome. Questions ? 24 Théo Rogliano

    Soyez le premier à commenter

    Identifiez-vous pour voir les commentaires

Talk from IWST at ESUG19, Cologne, Germany

Vues

Nombre de vues

419

Sur Slideshare

0

À partir des intégrations

0

Nombre d'intégrations

7

Actions

Téléchargements

1

Partages

0

Commentaires

0

Mentions J'aime

0

×