Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Type declarations as subtype constraints in logic programming

Published: 01 June 1990 Publication History

Abstract

This paper presents a type system for logic programs that supports parametric polymorphism and subtypes. This system follows most knowledge representation and object-oriented schemes in that subtyping is name-based, i.e., τ1 is considered to be a subtype of τ2 iff it is declared as such. We take this as a fundamental principle in the sense that type declarations have the form of subtype constraints. Types are assigned meaning by viewing such constraints as Horn clauses that, together with a few basic axioms, define a subtype predicate. This technique provides a (least) model for types and, at the same time, a sound and complete proof system for deriving subtypes. Using this proof system, we define well-typedness conditions which ensure that a logic program/query respects a set of predicate types. We prove that these conditions are consistent in the sense that every atom of every resolvent produced during the execution of a well-typed program is consistent with its type.

References

[1]
H. Ait-Kaci and R. Nasr. Latin: A logic programming language with built-in inheritance. Journal of Logic Programming, 3:185- 215, 1986.
[2]
K.R. Apt. Introduction to logic programmint. Technical Report TR-87-35, Department of Computer Sciences, University of Texas, Austin, 1988.
[3]
K.L. Clark. Predicate logic as a computational formalism. Technical Report DOC ?9/99, Department of Computing, Imperial College, 1979.
[4]
Roland Dietrich and Frank Hag}. A polymorphic type system with subtypes for prolog. In Proc and European Symposium on Programruing, Springer .Verlag LNCS 300, 1988.
[5]
J.A. Goguen and J. Meseguer. Eqlog: equality, types, and generic modules for logic protramming. In D. DeGroot and G. Lindstrorn, editors, Logic Programming: Functions, Relationz, and Equation. Prentice-Hall, Englewood Cliffs, 1986.
[6]
P. Mishra. Towards a theory of types in prolog. In Proc of the International Symposium of Logic Programming, pages 289-298. IEEE, 1984.
[7]
A. Mycroft and IL A. O'Keefe. A polymorphic type system for prolog. A rtificial Intelligence, 23:295-307, 1984.
[8]
P. Mishra and U.S. Reddy. Declaration-free type checking. In Proc Symposium on Princi. pies of Programming Languages, pages 7-21. ACM, 1985.
[9]
Uday S. Reddy. Notions of polymorphism for predicate logic programs. In Proc of the 5th International Symposium on Logic Programming. IEEE, 1988.
[10]
Gert Smolka. Logic programming with polymorphically order-sorted types. In Proceed. ings 1st International Workshop on Algebraic and Logic Programming, 1988. G aussig, (}DR.
[11]
Eyal Yardeni and Ehud Shapiro. A type systern for logic programs, in Ehud Shapiro, editor, Concurrent Prolog Vol. 2. MIT Press; 1987.
[12]
J. Zobel. Derivation of polymorphlc types for pxolos programs. In Proc of the jth International Symposium on Logic Programvning, pages 817-838. IEEE, 1987.

Cited By

View all
  • (2001)On Dart-Zobel Algorithm for testing regular type inclusionACM SIGPLAN Notices10.1145/609769.60978236:9(81-85)Online publication date: 1-Sep-2001
  • (1991)A first-order theory of types and polymorphism in logic programming[1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science10.1109/LICS.1991.151655(310-321)Online publication date: 1991

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 25, Issue 6
Jun. 1990
343 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/93548
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '90: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation
    June 1990
    351 pages
    ISBN:0897913647
    DOI:10.1145/93542
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1990
Published in SIGPLAN Volume 25, Issue 6

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)51
  • Downloads (Last 6 weeks)7
Reflects downloads up to 14 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2001)On Dart-Zobel Algorithm for testing regular type inclusionACM SIGPLAN Notices10.1145/609769.60978236:9(81-85)Online publication date: 1-Sep-2001
  • (1991)A first-order theory of types and polymorphism in logic programming[1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science10.1109/LICS.1991.151655(310-321)Online publication date: 1991

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media