From generic to specific: off-line optimization for a general constraint solver

  • Authors:
  • Ye Zhang;Torben Amtoft;Flemming Nielson

  • Affiliations:
  • Technical University of Denmark, Lyngby, Denmark;Kansas State University, Manhattan, KS, USA;Technical University of Denmark, Lyngby, Denmark

  • Venue:
  • GPCE '08 Proceedings of the 7th international conference on Generative programming and component engineering
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

A general constraint solver simplifies the implementation of program analyses because constraint generation can then be separated from constraint solving. In return, a general solver often needs to sacrifice performance for generality. We describe a strategy that given a set of constraints first performs off-line optimizations (performed before the execution of the solver) which enable a solver to find (potential) equivalences between analysis variables so as to reduce the problem space and thus improve performance. The idea is that different analyses use different subsets of constraints. As a result, a specific property may hold for the subsets and a specific optimization can be conducted on the constraints. To be concrete, we introduce two off-line algorithms and apply them on the constraints generated by Andersen's pointer analysis, or by a reaching definitions analysis, respectively. The experimental results show that these algorithms dramatically reduce the effort of solving the constraints, by detecting and unifying equivalent analysis variables. Furthermore, because these optimizations are conducted on constraints instead of analysis specifications, we can reuse them for different analyses and even automatically detect the off-line analyses to be used.