A Three-Valued Semantics for Typed Logic Programming

09/18/2019
by   João Barbosa, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/30/2022

Typed SLD-Resolution: Dynamic Typing for Logic Programming

The semantic foundations for logic programming are usually separated int...
research
09/14/2017

Structural Resolution for Abstract Compilation of Object-Oriented Languages

We propose abstract compilation for precise static type analysis of obje...
research
10/12/2018

Semantic subtyping for non-strict languages

Semantic subtyping is an approach to define subtyping relations for type...
research
07/13/2023

Ill-Typed Programs Don't Evaluate

We introduce two-sided type systems, which are a particular kind of sequ...
research
03/15/2023

Quantitative Global Memory

We show that recent approaches of static analysis based on quantitative ...
research
02/26/2022

Semantic Soundness for Language Interoperability

Programs are rarely implemented in a single language, and thus questions...
research
08/14/2021

Data Type Inference for Logic Programming

In this paper we present a new static data type inference algorithm for ...

Please sign up or login with your details

Forgot password? Click here to reset