Strictness Analysis as Finite-Domain Constraint Solving. Gabrić, T., Glynn, K., & Søndergaard, H. In Logic-Based Program Synthesis and Transformation, volume 1559, of Lecture Notes in Computer Science, pages 255–270, Berlin, Germany, 1999. Springer.
doi  abstract   bibtex   
It has become popular to express dataflow analyses in logical form. In this paper we investigate a new approach to the analysis of functional programs, based on synthesis of constraint logic programs. We sketch how the language Toupie, originally designed with logic program analysis as one objective, lends itself also to sophisticated strictness analysis. Strictness analysis is straightforward in the simplest case, that of analysing a first-order functional language using just two strictness values, namely divergence and ``don't know''. Mycroft's classical translation immediately yields perfectly valid Boolean constraint logic programs, which, when run, provide the desired strictness information. However, more sophisticated analysis requires more complex domains of strictness values. We recast Wadler's classical analysis over a 2n-point domain as finite-domain constraint solving. This approach has several advantages. First, the translation is relatively simple. We translate a recursive function definition into one or two constraint program clauses, in a manner which naturally extends Mycroft's translation for the 2-point case, where the classical approach translate the definition of an n-place function over lists into 4n mutually recursive equations. Second, the resulting program produces relational information, allowing for example to ask which combinations of properties of input will produce a given output. Third, the approach allows us to leverage from established technology, for solving finite-domain constraints, as well as for finding fixed points. Finally, the use of (disjunctive) constraints can yield a higher precision in the analysis of some programs.
@InProceedings{Gab-Gly-Son_LOPSTR98,
  author    = {Tihomir Gabri{\'c} and 
		Kevin Glynn and 
		Harald S{\o}ndergaard},
  title     = {Strictness Analysis as Finite-Domain Constraint Solving},
  editor    = {P. Flener},
  booktitle = {Logic-Based Program Synthesis and Transformation},
  series    = {Lecture Notes in Computer Science},
  volume    = {1559},
  pages     = {255--270},
  publisher = {Springer},
  address   = {Berlin, Germany},
  year      = {1999},
  doi       = {10.1007/3-540-48958-4_14},
  abstract  = {It has become popular to express dataflow analyses in logical 
		form. In this paper we investigate a new approach to the 
		analysis of functional programs, based on synthesis of 
		constraint logic programs. We sketch how the language Toupie,
		originally designed with logic program analysis as one 
		objective, lends itself also to sophisticated strictness 
		analysis. Strictness analysis is straightforward in the 
		simplest case, that of analysing a first-order functional 
		language using just two strictness values, namely divergence 
		and ``don't know''. Mycroft's classical translation immediately
		yields perfectly valid Boolean constraint logic programs, 
		which, when run, provide the desired strictness information.
		However, more sophisticated analysis requires more complex 
		domains of strictness values. We recast Wadler's classical 
		analysis over a 2<i>n</i>-point domain as finite-domain 
		constraint solving. This approach has several advantages.
		First, the translation is relatively simple. We translate a 
		recursive function definition into one or two constraint 
		program clauses, in a manner which naturally extends Mycroft's
		translation for the 2-point case, where the classical approach
		translate the definition of an <i>n</i>-place function over 
		lists into 4<sup><i>n</i></sup> mutually recursive equations. 
		Second, the resulting program produces <i>relational</i> 
		information, allowing for example to ask which combinations of 
		properties of input will produce a given output. Third, the 
		approach allows us to leverage from established technology, 
		for solving finite-domain constraints, as well as for finding 
		fixed points. Finally, the use of (disjunctive) constraints can
		yield a higher precision in the analysis of some programs.},
  keywords  = {Strictness analysis, Abstract interpretation, Abstract domains, Functional programming, Constraint programming},
}

Downloads: 0