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 full-size slide

  2. Refactoring Browser

    View full-size slide

  3. Maintenance Tools
    Have to be Maintained

    View full-size slide

  4. Usage Contracts Hapao
    Code Browsing
    Stack Traces

    View full-size slide

  5. SmallLint Tools
    Refactoring Browser CriticBrowser

    View full-size slide

  6. Development Tools
    Code Browser Versioning System Issue Tracker

    View full-size slide

  7. Issue Integration
    Smart Test
    Calypso
    Message Browser
    Debugger
    RENRAKU

    View full-size slide

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

    View full-size slide

  9. 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 full-size 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 full-size slide

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

    View full-size slide

  12. Validation Example

    View full-size slide

  13. Match Rule Example

    View full-size slide

  14. Invocation Order Rule Example

    View full-size slide

  15. 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 full-size slide

  16. 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 full-size slide

  17. 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 full-size slide

  18. Property Exempli!ed

    View full-size slide

  19. Property Exempli!ed
    Icon

    View full-size slide

  20. Property Exempli!ed
    Icon Title

    View full-size slide

  21. Property Exempli!ed
    Icon Title
    Actions

    View full-size slide

  22. 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 full-size slide

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

    View full-size slide

  24. Interests
    checksMethod
    ^ true
    interest
    ^ CompildeMethod

    View full-size slide

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

    View full-size slide

  26. Tools
    critiques externalProperties

    View full-size slide

  27. Routing
    RENRAKU

    View full-size slide

  28. Routing
    RENRAKU

    View full-size slide

  29. Routing
    RENRAKU

    View full-size slide

  30. 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 full-size slide