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

Renraku — the One Static Analysis Model to Rule Them All (iwst2017)

Yuriy Tymchuk
September 05, 2017

Renraku — the One Static Analysis Model to Rule Them All (iwst2017)

Most static analyzers are monolithic applications that define their own ways to analyze source code and present the results.
Therefore aggregating multiple static analyzers into a single tool or integrating a new analyzer into existing tools requires a significant amount of effort.

Over the last few years, we cultivated Renraku --- a static analysis model that acts as a mediator between the static analyzers and the tools that present the reports.
When used by both analysis and tool developers, this single quality model can reduce the cost to both introduce a new type of analysis to existing tools and create a tool that relies on existing analyzers.

Yuriy Tymchuk

September 05, 2017
Tweet

More Decks by Yuriy Tymchuk

Other Decks in Programming

Transcript

  1. Renraku
    The One Static Analysis Model
    to Rule Them All
    Yuriy Tymchuk
    SCG @ Unibe
    Mohammad Ghafari
    Oscar Nierstrasz

    View Slide

  2. SmallLint

    View Slide

  3. Refactoring Browser

    View Slide

  4. Maintenance Tools
    Have to be Maintained

    View Slide

  5. Usage Contracts Hapao
    Code Browsing
    Stack Traces

    View Slide

  6. SmallLint Tools
    Refactoring Browser CriticBrowser

    View Slide

  7. Development Tools
    Code Browser Versioning System Issue Tracker

    View Slide

  8. Issue Integration
    Smart Test
    Calypso
    Message Browser
    Debugger
    RENRAKU

    View Slide

  9. Renraku Trinity
    Critique
    Target
    Rule
    of
    has
    by
    produces 1
    1
    0..*
    0..*
    validates

    View Slide

  10. Renraku UML Subset
    title()
    icon()
    Property
    act(property, target)
    description
    icon
    action
    PropertyAction
    0..*
    actions
    description()
    ban()
    tinyHint
    Critique
    checksClass()
    checksMethod()
    checksPackage()
    checksNode()
    name()
    rationale()
    group()
    severity()
    checkTarget(target)
    AbstractRule
    interval()
    SourceAnchor Object
    interval()
    StringMatchSourceAnchor
    stringToSearch
    interval()
    IntervalSourceAnchor
    interval
    checksNode()
    NodeBasedRule
    refactoryChange()
    TransformationCritique
    refactoryChange()
    tinyHint()
    selector
    class
    source
    MissingMethodCritique
    refactoryChange()
    oldNode
    newNode
    NodeReplace
    title()
    description()
    formerMessage
    laterMessage
    InvocationOrderCritique
    checkTarget(target)
    NodeMatchRule
    checkTarget(target)
    NodeTransformRule
    checksMethod()
    checkTarget(target)
    CollectionCopyEmptyRule
    sourceAnchor
    1
    entity
    1
    rule
    1

    View Slide

  11. Renraku UML Subset
    title()
    icon()
    Property
    act(property, target)
    description
    icon
    action
    PropertyAction
    0..*
    actions
    description()
    ban()
    tinyHint
    Critique
    checksClass()
    checksMethod()
    checksPackage()
    checksNode()
    name()
    rationale()
    group()
    severity()
    checkTarget(target)
    AbstractRule
    interval()
    SourceAnchor Object
    interval()
    StringMatchSourceAnchor
    stringToSearch
    interval()
    IntervalSourceAnchor
    interval
    checksNode()
    NodeBasedRule
    refactoryChange()
    TransformationCritique
    refactoryChange()
    tinyHint()
    selector
    class
    source
    MissingMethodCritique
    refactoryChange()
    oldNode
    newNode
    NodeReplace
    title()
    description()
    formerMessage
    laterMessage
    InvocationOrderCritique
    checkTarget(target)
    NodeMatchRule
    checkTarget(target)
    NodeTransformRule
    checksMethod()
    checkTarget(target)
    CollectionCopyEmptyRule
    sourceAnchor
    1
    entity
    1
    rule
    1

    View Slide

  12. The Rule
    checksPackage
    checksClass
    checksMethod
    checksNode
    Interest
    (class side)
    Information
    name
    severity
    rationale
    (class comment)
    group
    Validation
    check: anEntity forCritiquesDo: aBlock

    View Slide

  13. Validation Example

    View Slide

  14. Match Rule Example

    View Slide

  15. Invocation Order Rule Example

    View Slide

  16. Renraku UML Subset
    title()
    icon()
    Property
    act(property, target)
    description
    icon
    action
    PropertyAction
    0..*
    actions
    description()
    ban()
    tinyHint
    Critique
    checksClass()
    checksMethod()
    checksPackage()
    checksNode()
    name()
    rationale()
    group()
    severity()
    checkTarget(target)
    AbstractRule
    interval()
    SourceAnchor Object
    interval()
    StringMatchSourceAnchor
    stringToSearch
    interval()
    IntervalSourceAnchor
    interval
    checksNode()
    NodeBasedRule
    refactoryChange()
    TransformationCritique
    refactoryChange()
    tinyHint()
    selector
    class
    source
    MissingMethodCritique
    refactoryChange()
    oldNode
    newNode
    NodeReplace
    title()
    description()
    formerMessage
    laterMessage
    InvocationOrderCritique
    checkTarget(target)
    NodeMatchRule
    checkTarget(target)
    NodeTransformRule
    checksMethod()
    checkTarget(target)
    CollectionCopyEmptyRule
    sourceAnchor
    1
    entity
    1
    rule
    1

    View Slide

  17. Property
    title()
    icon()
    Property
    act(property, target)
    description
    icon
    action
    PropertyAction
    0..*
    actions
    description()
    ban()
    tinyHint
    Critique
    checksClass()
    checksMethod()
    checksPackage()
    checksNode()
    name()
    rationale()
    group()
    severity()
    checkTarget(target)
    AbstractRule
    interval()
    SourceAnchor Object
    interval()
    StringMatchSourceAnchor
    stringToSearch
    interval()
    IntervalSourceAnchor
    interval
    checksNode()
    NodeBasedRule
    refactoryChange()
    TransformationCritique
    refactoryChange()
    tinyHint()
    selector
    class
    source
    MissingMethodCritique
    refactoryChange()
    oldNode
    newNode
    NodeReplace
    title()
    description()
    formerMessage
    laterMessage
    InvocationOrderCritique
    checkTarget(target)
    NodeMatchRule
    checkTarget(target)
    NodeTransformRule
    checksMethod()
    checkTarget(target)
    CollectionCopyEmptyRule
    sourceAnchor
    1
    entity
    1
    rule
    1
    Target
    Rule

    View Slide

  18. title()
    icon()
    actions()
    target
    Property
    description()
    ban()
    tinyHint
    rule
    Critique
    refactoryChange()
    TransformationCritique
    package
    DependencyCritique
    noteText
    Note
    url
    IssueTrackerEntry
    Open in web browser
    Edit note
    View description
    Ban critique
    Automatically resolve Open dependency browser
    — critique’s
    action

    View Slide

  19. Property Exempli!ed

    View Slide

  20. Property Exempli!ed
    Icon

    View Slide

  21. Property Exempli!ed
    Icon Title

    View Slide

  22. Property Exempli!ed
    Icon Title
    Actions

    View Slide

  23. Renraku UML Subset
    title()
    icon()
    Property
    act(property, target)
    description
    icon
    action
    PropertyAction
    0..*
    actions
    description()
    ban()
    tinyHint
    Critique
    checksClass()
    checksMethod()
    checksPackage()
    checksNode()
    name()
    rationale()
    group()
    severity()
    checkTarget(target)
    AbstractRule
    interval()
    SourceAnchor Object
    interval()
    StringMatchSourceAnchor
    stringToSearch
    interval()
    IntervalSourceAnchor
    interval
    checksNode()
    NodeBasedRule
    refactoryChange()
    TransformationCritique
    refactoryChange()
    tinyHint()
    selector
    class
    source
    MissingMethodCritique
    refactoryChange()
    oldNode
    newNode
    NodeReplace
    title()
    description()
    formerMessage
    laterMessage
    InvocationOrderCritique
    checkTarget(target)
    NodeMatchRule
    checkTarget(target)
    NodeTransformRule
    checksMethod()
    checkTarget(target)
    CollectionCopyEmptyRule
    sourceAnchor
    1
    entity
    1
    rule
    1

    View Slide

  24. Renraku UML Subset
    interval()
    SourceAnchor Object
    interval()
    StringMatchSourceAnchor
    stringToSearch
    interval()
    IntervalSourceAnchor
    interval
    title()
    formerMessage
    laterMessage
    InvocationOrderCritique
    sourceAnchor
    1
    entity
    1

    View Slide

  25. Demo

    View Slide

  26. The Issues

    View Slide

  27. Interests
    checksMethod
    ^ true
    interest
    ^ CompildeMethod

    View Slide

  28. Interests
    checksNode
    ^ true
    interest
    ^ RBMessageNode
    checkNode: aNode
    node isMessage…

    View Slide

  29. Tools
    critiques externalProperties

    View Slide

  30. Routing
    RENRAKU

    View Slide

  31. Routing
    RENRAKU

    View Slide

  32. Routing

    View Slide

  33. Routing

    View Slide

  34. Routing
    RENRAKU

    View Slide

  35. Renraku The One Static Analysis Model
    to Rule Them All
    Object Analysis
    Incremental Rules Incremental Tools
    Yuriy Tymchuk Mohammad Ghafari Oscar Nierstrasz
    Software Composition Group @ University of Bern

    View Slide