【24h】

Optimizing the Runtime Processing of Types in Polymorphic Logic Programming Languages

机译:在多态逻辑编程语言中优化类型的运行时处理

获取原文
获取原文并翻译 | 示例

摘要

The traditional purpose of types in programming languages of providing correctness assurances at compile time is increasingly being supplemented by a direct role for them in the computational process. In the context of typed logic programming, this is manifest in their effect on the unification operation. Their influence takes two different forms. First, in a situation where polymorphism is permitted, type information is needed to determine if different occurrences of the same name in fact denote an identical constant. Second, type information may determine the form of bindings for variables. When types are needed for the second purpose as in the case of higher-order unification, these have to be available with every variable and constant. However, in situations such as first-order and higher-order pattern unification, types have no impact on the variable binding process. As a consequence, type examination is needed in these situations only for the first of the two purposes described and even here a careful preprocessing can considerably reduce their runtime footprint. We develop a scheme for treating types in these contexts that exploits this observation. Under this scheme, type information is elided in most cases and is embedded into term structure when this is not entirely possible. Our approach obviates types when properties known as definitional genericity and type preservation are satisfied and has the advantage of working even when these conditions are violated.
机译:在编译时提供正确性保证的编程语言中,类型的传统目的正日益被它们在计算过程中的直接作用所补充。在类型逻辑编程的上下文中,这体现在它们对统一操作的影响上。他们的影响采取两种不同的形式。首先,在允许多态的情况下,需要类型信息来确定是否出现相同名称的事实实际上表示相同常数。其次,类型信息可以确定变量绑定的形式。当第二类需要类型时,例如在高阶统一的情况下,则必须在每个变量和常量中使用这些类型。但是,在诸如一阶和高阶模式统一之类的情况下,类型对变量绑定过程没有影响。因此,在这些情况下,仅出于描述的两个目的中的第一个需要类型检查,即使在这里进行仔细的预处理也可以显着减少其运行时占用空间。我们开发了一种利用这些观察结果来处理这些情况下的类型的方案。在这种方案下,在大多数情况下,类型信息会被忽略,而当这不是完全可能时,则将其嵌入术语结构中。当满足称为定义通用性和类型保留的属性时,我们的方法将消除类型,并且即使在违反这些条件的情况下,也具有工作的优势。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号