计算机科学 > 程序设计语言
[提交于 2004年9月21日]
标题:Checking modes of HAL programs
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Peter J. Stuckey[v1] 2004年9月21日 星期二 11:48:47 UTC