A type system for logic program
Eyal Yardeni,Ehud Shapiro +1 more
147
TL;DR: A theory for a type system for logic programs is developed which address the question of well-typing, type inference, and compile-time and run-time type checking, and a restricted class of types, called regular types, for which type checking is decidable.
read more
Abstract: A theory for a type system for logic programs is developed which addressesthe question of well-typing, type inference, and compile-time and run-time type checking. A type is a recursively enumerable set of ground atoms, which is tuple-distributive. The association of a type to a program is intended to mean that only ground atoms that are elements of the type may be derived from the program. A declarative definition of well-typed programs is formulated, based on an intuitive approach related to the fixpoint semantics of logic programs. Whether a program is well typed is undecidable in general. We define a restricted class of types, called regular types, for which type checking is decidable. Regular unary logic programs are proposed as a specification language for regular types. An algorithm for type-checking a logic program with respect to a regular type definition is described, and its complexity is analyzed. Finally, the practicality of the type system is discussed, and some examples are shown. The type system has been implemented in FCP for FCP and is incorporated in the Logix system.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Abstract interpretation and application to logic programs
Patrick Cousot,Rahida Cousot +1 more
TL;DR: This classical formal framework for abstract interpretation of programs can be applied in extenso to logic programs and is recalled, using a variant of SLD-resolution as the ground operational semantics.
712
•Proceedings Article
Fast and precise regular approximations of logic programs
John P. Gallagher,DA De Waal +1 more
- 23 Aug 1994
TL;DR: A practical procedure for computing a regular approximation of a logic program that incorporates optimisations taken from deductive database fixpoint algorithms and efficient bottom-up abstract interpretation techniques is given.
A finite presentation theorem for approximating logic programs
Nevin Heintze,Joxan Jaffar +1 more
- 01 Dec 1989
TL;DR: The main result proves that the approximation defined in this paper is not only recursive, but that it can be finitely represented in the form of a cyclic term graph.
147
Type analysis of prolog using type graphs
TL;DR: A novel widening operator for type graphs which appears to be accurate and effective in keeping the sizes of the graphs, and hence the computation time, reasonably small is described.
100
References
•Book
The Design and Analysis of Computer Algorithms
Alfred V. Aho,John E. Hopcroft +1 more
- 01 Jan 1974
TL;DR: This text introduces the basic data structures and programming techniques often used in efficient algorithms, and covers use of lists, push-down stacks, queues, trees, and graphs.
10.6K
Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints
Patrick Cousot,Radhia Cousot +1 more
- 01 Jan 1977
TL;DR: In this paper, the abstract interpretation of programs is used to describe computations in another universe of abstract objects, so that the results of abstract execution give some information on the actual computations.
•Book
Foundations of logic programming
John W. Lloyd
- 01 Jan 1984
TL;DR: This is the second edition of an account of the mathematical foundations of logic programming, which collects, in a unified and comprehensive manner, the basic theoretical results of the field, which have previously only been available in widely scattered research papers.
4.5K
Related Papers (5)
John P. Gallagher,DA De Waal +1 more
- 23 Aug 1994
Philip W. Dart,Justin Zobel +1 more
- 01 Jan 1992
Prateek Mishra
- 01 Jan 1984
John W. Lloyd
- 01 Jan 1984