A precise type analysis of logic programs
Proceedings of the 2nd ACM SIGPLAN international conference on Principles and practice of declarative programming
A practical type analysis for verification of modular prolog programs
PEPM '08 Proceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Improving precision of type analysis using non-discriminative union
Theory and Practice of Logic Programming
Concurrency, Graphs and Models
CLP projection for constraint handling rules
Proceedings of the 13th international ACM SIGPLAN symposium on Principles and practices of declarative programming
An overview of ciao and its design philosophy
Theory and Practice of Logic Programming - Prolog Systems
Hi-index | 0.00 |
Approximate descriptions of the success set of a program have many uses in program development and optimisation. For untyped logic programming languages, regular approximation is a practical and useful tool. In this paper we consider the problem of approximating the meaning of programs in which some (polymorphic) type information is given. This situation can arise in constraint logic programming languages. In untyped languages the user could impose types on selected symbols. % as well as typed logic programming languages like Goedel. Even in strongly typed languages we may be able to derive more precise descriptions of the meaning, or to consider restricted uses of polymorphic typed predicates. We propose a practical two-stage method: first the original program is transformed by replacing typed arguments by corresponding polymorphic type terms. For well-typed programs the resulting program is an abstraction of the original. Second, an established algorithm for regular approximation is applied to the transformed program. The algorithm is guaranteed to terminate without using artificial techniques such as depth-k bounds on (type) terms. The derived description combines polymorphic type terms, including union types, with regular descriptions of untyped terms. The method allows goal-dependent analysis as well as goal-independent analysis of a complete program. We show some experimental results demonstrating the speed and precision of the method and show that it scales up well when applied to larger programs.