The semantic foundations for logic programming are usually separated into two different approaches. The operational semantics, which uses SLD-resolution, the proof method that computes answers in logic programming, and the declarative semantics, which sees logic programs as formulas and its semantics as models. Here, we define a new operational semantics called TSLD-resolution, which stands for Typed SLD-resolution, where we include a value "wrong", that corresponds to the detection of a type error at run-time. For this we define a new typed unification algorithm. Finally we prove the correctness of TSLD-resolution with respect to a typed declarative semantics.
翻译:逻辑编程的语义基础通常分为两种不同的方法。 使用 SLD 分辨率( SLD 分辨率计算答案的证明方法)的操作语义学和将逻辑程序视为公式及其语义模型的宣示语义学。 在这里, 我们定义了一种称为 TSLD 分辨率( TSLD 分辨率)的新的操作语义学, 它代表了输入 SLD 分辨率( 包括一个值“ 错误 ” ), 与运行时发现类型错误相对应。 为此, 我们定义了一种新的类型统一算法。 最后, 我们证明了 TSLD 分辨率对类型声明语义的正确性 。