Hostname: page-component-745bb68f8f-d8cs5 Total loading time: 0 Render date: 2025-02-11T13:21:45.851Z Has data issue: false hasContentIssue false

Checking modes of HAL programs

Published online by Cambridge University Press:  31 October 2005

MARIC GARCÍA DE LA BANDA
Affiliation:
School of Computer Science & Software Engineering, Monash University, Australia (e-mail: mbanda@csse.monash.edu.au, marriott@csse.monash.edu.au) (e-mail: (wh@icparc.ic.ac.uk)
WARWICK HARVEY
Affiliation:
School of Computer Science & Software Engineering, Monash University, Australia (e-mail: mbanda@csse.monash.edu.au, marriott@csse.monash.edu.au) (e-mail: (wh@icparc.ic.ac.uk)
KIM MARRIOTT
Affiliation:
School of Computer Science & Software Engineering, Monash University, Australia (e-mail: mbanda@csse.monash.edu.au, marriott@csse.monash.edu.au) (e-mail: (wh@icparc.ic.ac.uk)
PETER J. STUCKEY
Affiliation:
Department of Computer Science & Software Engineering, University of Melbourne, Australia (e-mail: pjs@cs.mu.oz.au)
BART DEMOEN
Affiliation:
Department of Computer Science, Catholic University Leuven, Belgium (e-mail: bmd@cs.kuleuven.ac.be)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Recent constraint logic programming (CLP) languages, such as HAL and Mercury, require type, mode and determinism declarations for predicates. This information allows the generation of efficient target code and the detection of many errors at compile-time. Unfortunately, mode checking in such languages is difficult. One of the main reasons is that, for each predicate mode declaration, the compiler is required to appropriately re-order literals in the predicate's definition. The task is further complicated by the need to handle complex instantiations (which interact with type declarations and higher-order predicates) and automatic initialization of solver variables. Here we define mode checking for strongly typed CLP languages which require reordering of clause body literals. In addition, we show how to handle a simple case of polymorphic modes by using the corresponding polymorphic types.

Type
Regular Papers
Copyright
2005 Cambridge University Press

Footnotes

A preliminary version of this paper appeared under the title “Mode Checking in HAL,” in the Conference on Computational Logic (CL'2000), London, June 2000.