Download PDF

18th Logic-Based Program Synthesis and Transformation, Date: 2008/07/17 - 2008/07/18, Location: Valencia, Spain

Publication date: 2009-01-01
Volume: 5438 Pages: 152 - 167
ISBN: 978-3-642-00514-5 ISSN: 0302-9743
Publisher: Springer

Lecture Notes in Computer Science

Author:

Schrijvers, Tom
Bruynooghe, Maurice ; Gallagher, John P ; Hanus, M

Keywords:

type inference, Prolog, logic programming, well-typing, type definition, polymorphism, Science & Technology, Technology, Computer Science, Software Engineering, Computer Science, Theory & Methods, Computer Science, INFERENCE

Abstract:

Type information has many applications; it can e.g. be used in optimized compilation, termination analysis and error detection. How- ever, logic programs are typically untyped. A well-typed program has the property that it behaves identically on well-typed goals with or without type checking. Hence the automatic inference of a well-typing is worth- while. Existing inferences are either cheap and inaccurate, or accurate and expensive. By giving up the requirement that all calls to a predicate have types that are instances of a unique polymorphic type but instead allowing multiple polymorphic typings for the same predicate, we ob- tain a novel strongly-connected-component-based analysis that provides a good compromise between accuracy and computational cost.