JUCS - Journal of Universal Computer Science 6(4): 474-488, doi: 10.3217/jucs-006-04-0474
Ensuring Termination in ESFP
expand article infoAlastair Telford, David Turner
‡ The Computing Laboratory, The University, Canterbury, Kent, United Kingdom
Open Access
In previous papers we have proposed an elementary discipline of strong functional programming (ESFP), in which all computations terminate. A key feature of the discipline is that we introduce a type distinction between data which is known to be finite, and codata which is (potentially) infinite. To ensure termination, recursion over data must be well-founded, and corecursion (the definition schema for codata) must be productive, and both of these restrictions must be enforced automatically by the compiler. In our previous work we used abstract interpretation to establish the productivity of corecursive definitions in an elementary strong functional language. We show here that similar ideas can be applied in the dual case to check whether recursive function definitions are strongly normalising. We thus exhibit a powerful termination analysis technique which we demonstrate can be extended to partial functions.
functional programming, termination analysis, abstract interpretation