softwarelanguageslab / maf

Static Analysis Framework for Modular Analyses
Other
13 stars 12 forks source link

Use case objects for primitives #11

Closed jevdplas closed 3 years ago

jevdplas commented 3 years ago

Primitive values in the abstract interpreter are currently just implemented as Scala objects (cf. scalaam.language.scheme.primitives.SchemeLatticePrimitives).

As a result, the same primitive will get a different hash code on different runs of the same analysis, leading to non-deterministic behaviour in the exploration order of the analysis (which is undesirable when trying to reproduce the results of a previous analysis run).

Implementing them as case objects instead would avoid this issue.

acieroid commented 3 years ago

Proposed fix applied in 91cfab0