## Directional Type Checking of Logic Programs (1994)

Venue: | In Proceedings of the 1st International Static Analysis Symposium |

Citations: | 42 - 1 self |

### BibTeX

@INPROCEEDINGS{Aiken94directionaltype,

author = {Alexander Aiken and T. K. Lakshman},

title = {Directional Type Checking of Logic Programs},

booktitle = {In Proceedings of the 1st International Static Analysis Symposium},

year = {1994},

pages = {43--60},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

We present an algorithm for automatic type checking of logic programs with respect to directional types that describe both the structure of terms and the directionality of predicates. The type checking problem is reduced to a decidable problem on systems of inclusion constraints over set expressions. We discuss some properties of the reduction algorithm, complexity, and present a proof of correctness. 1 1 Introduction Most logic programming languages are untyped. In Prolog, for example, it is considered meaningful to apply any n-ary predicate to any n-tuple of terms. However, it is generally accepted that static type checking has great advantages in detecting programming errors early and for generating efficient executable code. Motivated at least in part by the success of type systems for procedural and functional languages, there is currently considerable interest in finding appropriate definitions of type and welltyping for logic languages. This paper explores the type checki...