arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0405100cs.PL
收藏

类型约束逻辑程序

Typing constraint logic programs

Francois Fages, Emmanuel Coquery

摘要:

本文提出了一个约束逻辑程序的参数多态和子类型的规定类型系统。这种类型的系统的目的是静态地检测编程错误。它为约束逻辑程序和模块引入了一种类型规则,同时保持了在约束域之间执行通常的转换的能力,以及由于子类型的灵活性而类型化元编程谓词的能力。主语归约的性质表达了规定类型系统与规则类型系统的一致性。执行模型:如果一个程序是“良好类型的”,那么所有从“良好类型的”目标开始的派生都是“良好类型的”。该性质是证明w.r.t.约束程序设计的抽象执行模型,它只通过约束的累积来进行,而w.r.t.一个丰富的执行模型与类型约束的替代。我们描述了我们的实现系统的类型检查和类型推断。本文报告了我们在ISO-Prolog、Sicstus Prolog的约束库和其它Prolog程序上进行类型检查的实验结果。

英文摘要:

We present a prescriptive type system with parametric polymorphism and subtyping for constraint logic programs. The aim of this type system is to detect programming errors statically. It introduces a type discipline for constraint logic programs and modules, while maintaining the capabilities of performing the usual coercions between constraint domains, and of typing meta-programming predicates, thanks to the flexibility of subtyping. The property of subject reduction expresses the consistency of a prescriptive type system w.r.t. the execution model: if a program is "well-typed", then all derivations starting from a "well-typed" goal are again "well-typed". That property is proved w.r.t. the abstract execution model of constraint programming which proceeds by accumulation of constraints only, and w.r.t. an enriched execution model with type constraints for substitutions. We describe our implementation of the system for type checking and type inference. We report our experimental results on type checking ISO-Prolog, the (constraint) libraries of Sicstus Prolog and other Prolog programs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑