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

类型化逻辑程序设计的三值语义

A Three-Valued Semantics for Typed Logic Programming

João Barbosa, Mário Florido, Vítor Santos Costa

摘要:

逻辑编程中的类型一方面关注常规类型对程序语义的保守近似,另一方面关注基于为类型化程序定义的规定语义的类型系统。在本文中,我们定义了一个新的语义逻辑编程,程序评估为真,假,并称为错误的一个新的语义值,对应于一个运行时类型错误。这样我们就有了一种具有分离的类型语义的类型语言。最后,我们定义了一个类型系统的逻辑编程,并证明它是语义上的声音相对于程序和类型之间的语义关系,如果一个程序有一个类型,那么它的语义是没有错的。我们的工作遵循米尔纳的方法类型的函数语言的语义程序是独立的类型的语义,类型系统被证明是健全的两个语义之间的关系。

英文摘要:

Types in logic programming have focused on conservative approximations of program semantics by regular types, on one hand, and on type systems based on a prescriptive semantics defined for typed programs, on the other. In this paper, we define a new semantics for logic programming, where programs evaluate to true, false, and to a new semantic value called wrong, corresponding to a run-time type error. We then have a type language with a separated semantics of types. Finally, we define a type system for logic programming and prove that it is semantically sound with respect to a semantic relation between programs and types where, if a program has a type, then its semantics is not wrong. Our work follows Milner's approach for typed functional languages where the semantics of programs is independent from the semantic of types, and the type system is proved to be sound with respect to a relation between both semantics.

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

↑