Skip to content

Structure for value analysis #464

@ailrst

Description

@ailrst

Ideally our IR would be structured as a free algebra with recursion schemes, lacking this...

We would like an interface defined for symbolic evaluation of expressions. This is implemented once to a reasonably complete extent in the Known Bits Analysis. It would be good for this structure to be reusable for future planned value analyses to reduce some of the burden of deciding how to do this each time an analysis is written. Possible analyses we will implement in future are live bits, interval, SASI etc.

Acceptance critera

  1. implement an interface for defining a single-value 1-dimensional abstract domains (domains whose concretisation is a set of values) that abstracts out the recursion over expressions.
    • It should be possible to instantiate a state domain (e.g. maplattice) with an arbitrary a value domain (matching the interface defined in branch value-analysis-iface).
  2. validate this by refactoring the known bits analysis to use this abstraction
    • use the implement the value abstraction interface rather than defining its own recursive breakdown of the expressions
    • remove the custom state domain map from known bits and use the generic map lattice state domain

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions