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.