A Theory of Types and Type Inference in Logic Programming Languages

Jiyang Xu
1989-01-01
Abstract:Type systems for logic programming languages have been studied from several different motivations. Many type systems have been proposed with very different features. In this dissertation we first discuss various issues in studying type systems of logic programming languages, and then motivate our own point of view. We extend the model theory of first-order logic to allow partial functions and partial relations, which are used in interpreting typed logic programs. A theory of types and type inference for Horn clause programs is developed based on the extended logic. Illegal values are modeled by undefinedness of partial functions and partial relations in the theory, and type inference is formalized as a process that determines the partiality of functions and predicates through quotient models and abstract interpretations. A practical type inference procedure for Horn clause based logic programs is developed, and its soundness and completeness are verified. Our theory and type inference procedure are capable of dealing with inclusion polymorphism, parametric polymorphism as well as additive polymorphism. Optional user supplied type specifications are allowed, with logical semantics associated. The type inference procedure is closely coupled with a module system and abstract data types are supported.
What problem does this paper attempt to address?