1 / 62

On Analysing Multilanguage Systems

This article discusses the challenges faced in today's multi-language systems, such as complex interfaces and wrong assumptions, and presents potential solutions. The results and team members of the research program, MoSART, are also mentioned.

rming
Download Presentation

On Analysing Multilanguage Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. On Analysing Multilanguage Systems MoSART 16/05/02

  2. Who? What? How? Results? Logos by Gabriel Chojnacki

  3. 9 Ph.D. Graduates in Past Two Year

  4. New Team

  5. Manel Abdellatif. Ph.D. in progress Mouna Abidi. Ph.D. in progress Béchir Bani. M.Sc. in progress Luis Diego Correa Arias. Ph.D. in progress Mana Eskandari. Ph.D. in progress Olivier Grenier-Chenier. M.Sc. in progress Manel Grichi. Ph.D. in progress Zeinab (Azadeh) Kermansaravi. Ph.D. in progress Fábio Petrillo. Ph.D. in progress Théo Rubenach. M.Sc. in progress Anas Shatnawi. Post-doc. in progress Aymen Zalila. M.Sc. in progress Mahdis Zolfagharinia. M.Sc. in progress

  6. Funding

  7. Publications

  8. What’s with today’s systems?

  9. Challenges with Multi-language Systems • Today’s systems are multi-languages • Facebook • Twitter • … • Even your “regular” software system is now multi-language, typically a Web application

  10. Challenges with Multi-language Systems • New challenges • Different computational models • Complex interfaces (API) • Wrong assumptions • Wrong conversions • …

  11. Challenges with Multi-language Systems • For example, control- and data-flows between Java and “native” C/C++ code • native methods in Java are used by Java classes but (typically) implemented in C/C++

  12. Challenges with Multi-language Systems • Control-flow interactions • Java code calls native code • Native code calls Java methods • Native code can “throw” and must catch exceptions • Data-flow interactions • Java code passes objects (pointers) • Native code creates objects • …

  13. Challenges with Multi-language Systems • Different computational models Gang Tan and Jason Croft ; An Empirical Security Study of the Native Code in the JDK ; Proceedings of the 17th conference on Security Symposium, USENIX, 2008

  14. Challenges with Multi-language Systems • Different computational models static void *xmalloc(JNIEnv *env, size_t size) { void *p = malloc(size); if (p == NULL) JNU_ThrowOutOfMemoryError(env, NULL); return p; } #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type))) static const char *const *splitPath(JNIEnv *env, const char *path) { ... pathv = NEW(char *, count+1); pathv[count] = NULL; ... } Gang Tan and Jason Croft ; An Empirical Security Study of the Native Code in the JDK ; Proceedings of the 17th conference on Security Symposium, USENIX, 2008

  15. No diversion of control flow! Challenges with Multi-language Systems • Different computational models static void *xmalloc(JNIEnv *env, size_t size) { void *p = malloc(size); if (p == NULL) JNU_ThrowOutOfMemoryError(env, NULL); return p; } #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type))) static const char *const *splitPath(JNIEnv *env, const char *path) { ... pathv = NEW(char *, count+1); pathv[count] = NULL; ... } Gang Tan and Jason Croft ; An Empirical Security Study of the Native Code in the JDK ; Proceedings of the 17th conference on Security Symposium, USENIX, 2008

  16. Research Program

  17. Objectives • Objective 1: Definition and modeling of mixed-language patterns from the literature, from developers, and through the mining of real, open-source SIMILAS

  18. Objectives • Objective 2: Automated identification of occurrences of the modelled mixed-language patterns and source-code transformations to introduce/remove these occurrences to improve software quality

  19. Objectives • Objective 3: Characterisation of the modelled patterns and of their occurrences in SIMILAS to assess their prevalence and impact on the systems’ quality and developers’ comprehension

  20. Research Platform Ptidej Tool Suite Software tools Support the analysis of the implementation, design, and architecture of object-oriented programs Support the detection and introduction of patterns at the code, design, and architectural levels

  21. Ptidej Tool Suite Analysis Domain concepts “quality of object-oriented” “promoting the use of idioms, design patterns, and architectural patterns” “analysis of the implementation, design, and architecture of object-oriented programs” “detection and introduction of patterns at the code, design, and architectural levels”

  22. Ptidej Tool Suite Analysis Domain concepts “quality of object-oriented” “promoting the use of idioms, design patterns, and architectural patterns” “analysis of the implementation, design, and architecture of object-oriented programs” “detection and introduction of patterns at the code, design, and architectural levels”

  23. Ptidej Tool Suite Constraint Apply patterns/best practices (existing or new) when developing the tools Architectural Design Implementation Self-imposed but sensible “Eating your own dog food” (http://www.urbandictionary.com/define.php?term=eating%20your%20own%20dog%20food)

  24. Ptidej Tool Suite Related work Various parsers (target languages) e.g., GCCXML Various meta-model (sometimes implicit) Similar to UML meta-model (1997) Before OMG KDM (2003) Before Eclipse EMF (2004) Before OMG MOF (2006) Various tools e.g., Rigi (H. M. Kienle and H. A. Müller: Rigi – An environment for software reverse engineering, exploration, visualization, and redocumentation. Sci. Comput. Program. 75(4): 247-263, 2010)

  25. Ptidej Tool Suite Related work Existing  Too low-level e.g., GCCXML No “free” parsers e.g., UML meta-model Difficult to access / to use / to adapt e.g., Rigi

  26. Ptidej Tool Suite What to detect? In what to detect it? How to express it?

  27. Ptidej Tool Suite Design Patterns Models of OO programs PADL meta-model

  28. Ptidej Tool Suite PADL Pattern and Abstract-level Description Language

  29. Ptidej Tool Suite PADL Creators C++, C, Java, JavaScript? PADL Pattern and Abstract-level Description Language

  30. Ptidej Tool Suite • PADL Analyses • Binary Class Relationships • Systematic UML PADL Creators C++, C, Java, JavaScript? PADL Pattern and Abstract-level Description Language

  31. Ptidej Tool Suite PADL Generators XMI… • PADL Analyses • Binary Class Relationships • Systematic UML PADL Creators C++, C, Java, JavaScript? PADL Pattern and Abstract-level Description Language

  32. Ptidej Tool Suite PADL Generators XMI… • PADL Analyses • Binary Class Relationships • Systematic UML PADL Creators C++, C, Java, JavaScript? PADL Serialisers DB4O, JOS… PADL Pattern and Abstract-level Description Language

  33. Ptidej Tool Suite PADL Generators XMI… • PADL Analyses • Binary Class Relationships • Systematic UML PADL Design Motifs Anti-patterns, code smells, and -patterns PADL Creators C++, C, Java, JavaScript? PADL Serialisers DB4O, JOS… PADL Pattern and Abstract-level Description Language

  34. Ptidej Tool Suite PADL Generators XMI… POM Primitives, Operations, Metrics • PADL Analyses • Binary Class Relationships • Systematic UML PADL Design Motifs Anti-patterns, code smells, and -patterns PADL Creators C++, C, Java, JavaScript? PADL Serialisers DB4O, JOS… PADL Pattern and Abstract-level Description Language

  35. Ptidej Tool Suite (Ptidej Solver) Identification of design motifs PADL Generators XMI… POM Primitives, Operations, Metrics • PADL Analyses • Binary Class Relationships • Systematic UML PADL Design Motifs Anti-patterns, code smells, and -patterns PADL Creators C++, C, Java, JavaScript? PADL Serialisers DB4O, JOS… PADL Pattern and Abstract-level Description Language

  36. Ptidej Tool Suite (Ptidej Solver) Identification of design motifs SAD Identification of anti-patterns PADL Generators XMI… POM Primitives, Operations, Metrics • PADL Analyses • Binary Class Relationships • Systematic UML PADL Design Motifs Anti-patterns, code smells, and -patterns PADL Creators C++, C, Java, JavaScript? PADL Serialisers DB4O, JOS… PADL Pattern and Abstract-level Description Language

  37. Ptidej Tool Suite Ptidej UI User interface (using reflection) (Ptidej Solver) Identification of design motifs SAD Identification of anti-patterns PADL Generators XMI… POM Primitives, Operations, Metrics • PADL Analyses • Binary Class Relationships • Systematic UML PADL Design Motifs Anti-patterns, code smells, and -patterns PADL Creators C++, C, Java, JavaScript? PADL Serialisers DB4O, JOS… PADL Pattern and Abstract-level Description Language

  38. Ptidej UI Viewer Standalone Swing displaying PADL (Another example of “Eating your own dog food” )

  39. brunch.soccerlab.polymtl.ca

More Related