Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pharo Quality Engine: The Last Strokes (esug2017)

Pharo Quality Engine: The Last Strokes (esug2017)

Pharo 6 was shipped with Renraku — the single quality model to rule them all. While being an advanced piece of software, Renraku alone provided no immediate benefits to end users. In this talk, we are going to present the upcoming development changes that utilize Renraku and range from advanced bug fixing guidance to the five times speed up in quality rules; as well as a few more usability features.

Yuriy Tymchuk

September 04, 2017
Tweet

More Decks by Yuriy Tymchuk

Other Decks in Programming

Transcript

  1. @yuriy_tymchuk
    Pharo Quality Engine:
    The Last Strokes
    SCG @ Unibe

    View full-size slide

  2. Good Old QualityAssistant

    View full-size slide

  3. Code Browser Message Browser
    CriticBrowser Debugger

    View full-size slide

  4. Renraku Repository

    View full-size slide

  5. Renraku Repository

    View full-size slide

  6. Renraku Repository

    View full-size slide

  7. Behold the
    Features

    View full-size slide

  8. Test Coverage +20%

    View full-size slide

  9. Advanced Rule
    Banning

    View full-size slide

  10. Banning Better

    View full-size slide

  11. Banning Better

    View full-size slide

  12. Forcing Rules

    View full-size slide

  13. Ban/Force Importance
    All Images
    Package
    Package Image
    Package
    Class
    Method > > > >

    View full-size slide

  14. All Images
    Image All Images
    All Images
    Image
    Image
    Class
    Method > > > >
    Package
    Package
    Ban/Force Importance

    View full-size slide

  15. Class
    Method > > > >
    Package
    Package Image
    Image
    All Images
    All Images
    Ban/Force Importance

    View full-size slide

  16. Error Handling

    View full-size slide

  17. Error reporting

    View full-size slide

  18. Error reporting

    View full-size slide

  19. Error reporting
    on: Exception
    do: [ ]

    View full-size slide

  20. Error reporting
    Everything is
    awesome!

    View full-size slide

  21. Exception as a Property

    View full-size slide

  22. Exception as a Property

    View full-size slide

  23. Exception as a Property
    Property
    Critique Exception P.

    View full-size slide

  24. Exception as a Property
    message
    context
    debug
    rule
    ban
    auto!x
    Property
    Critique Exception P.

    View full-size slide

  25. Error reporting
    Ignore
    Pass Log

    View full-size slide

  26. Revamped
    Rules

    View full-size slide

  27. Rule Types Overview
    Transformation R.
    ParseTree R.
    Rule
    Class Rule Method Rule

    View full-size slide

  28. Transformation Rules

    View full-size slide

  29. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    rewrite node

    View full-size slide

  30. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    rewrite node
    for each rule

    View full-size slide

  31. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    rewrite node
    for each rule
    rule

    View full-size slide

  32. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    rewrite node
    for each rule
    rule

    View full-size slide

  33. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    for each rule
    rewrite node

    View full-size slide

  34. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    save node for rewrite
    for each rule

    View full-size slide

  35. Transformation Rule Algorithm
    parse source into an AST
    traverse AST by nodes
    node matches rule?
    save node for rewrite
    for each rule
    rule

    View full-size slide

  36. Parse Tree Rules
    (not so nice)

    View full-size slide

  37. Parse Tree Rules
    (not so nice)

    View full-size slide

  38. Parse Tree Rules
    (not so nice)
    `{ :node | “condition” } — matches any node

    View full-size slide

  39. Rule Types Overview
    Rule
    Class Rule Method Rule
    ParseTree R. Transformation R.

    View full-size slide

  40. Rule Types Overview
    Rule
    Class Rule Method Rule
    NodeMatch R. NodeRewrite R.
    Node Rule

    View full-size slide

  41. Parse Tree Rule
    (the result of a select: or detect: is not used)

    View full-size slide

  42. Match Rule
    (the result of a select: or detect: is not used)

    View full-size slide

  43. Parse Tree Rule
    (literal array of characters instead of a string)

    View full-size slide

  44. Match Rule
    (literal array of characters instead of a string)

    View full-size slide

  45. Parse Tree Rule
    (sends questionable messages)

    View full-size slide

  46. (sends questionable messages)
    Match Rule

    View full-size slide

  47. (sends questionable messages)
    Match Rule
    detects caseOf:otherwise:

    View full-size slide

  48. (sends questionable messages)
    Match Rule
    detects caseOf:otherwise:
    x7 faster

    View full-size slide

  49. (sends questionable messages)
    Match Rule
    detects caseOf:otherwise:
    x7 faster
    knows source interval

    View full-size slide

  50. Parse Tree Rule
    (modi!es foreign collection)

    View full-size slide

  51. Parse Tree Rule
    (modi!es foreign collection)

    View full-size slide

  52. Parse Tree Rule
    (modi!es foreign collection)

    View full-size slide

  53. Match Rule
    (modi!es foreign collection)

    View full-size slide

  54. Match Rule
    (modi!es foreign collection)

    View full-size slide

  55. Match Rule
    (modi!es foreign collection)

    View full-size slide

  56. Parse Tree Rule
    (compares "oats with =)

    View full-size slide

  57. Match Rule
    (compares "oats with =)

    View full-size slide

  58. Match Rule
    (compares "oats with =)

    View full-size slide

  59. Parse Tree Rule
    (manual literal search)

    View full-size slide

  60. Parse Tree Rule
    (manual literal search)

    View full-size slide

  61. Match Rule
    (manual literal search)

    View full-size slide

  62. Match Rule
    (manual literal search)

    View full-size slide

  63. Code Validation Speed

    View full-size slide

  64. Pharo 6
    Pharo 5
    Pharo 7
    1.4x
    2x
    1x
    Code Validation Speed

    View full-size slide

  65. Adv. Rule Toggle Errors as Properties Rule Overhaul
    RENRAKU
    The Technical Part
    Tomorrow, 3pm, BETA Room
    http://yuriy.tymch.uk/Renraku/ @yuriy_tymchuk
    @myroslavarm
    rule settings
    ban hierarchy debug post-mortem match map x2 speedup
    understandability
    pass/ignore/log

    View full-size slide