Polymorphic directional types for logic programming

  • Authors:
  • Pawel Rychlikowski;Tomasz Truderung

  • Affiliations:
  • Wrocław University, Poland;Wrocław University, Poland

  • Venue:
  • Proceedings of the 3rd ACM SIGPLAN international conference on Principles and practice of declarative programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper we present a new type system for logic programs. Our system combines ideas of the classical polymorphic, but not very precise, system due to Mycroft and O'Keefe [16], and the complementary system of directional types that has been proposed by Aiken and Lakshman [1].Our main technical inventions are a new method of deriving more specific types from a given type, which we call pruning, and the notion of the main type from which, using a combination of substitution, subtyping and pruning all types of a predicate can be obtained.We describe a type checking algorithm, and a type reconstruction algorithm which for a given program and a predicate finds its main type. A complexity analysis of these algorithms is provided. In spite of large theoretical complexity bounds these algorithms work quite fast in practice.