Sorted HiLog: Sorts in higher-order logic data languages

  • Weidong Chen
  • Michael Kifer
Contributed Papers Advanced Models
Part of the Lecture Notes in Computer Science book series (LNCS, volume 893)

Abstract

HiLog enhances the modeling capabilities of deductive data bases and logic programming with higher-order and meta-data constructs, complex objects, and schema browsing. Its distinctive feature, a higher-order syntax with a first-order semantics, allows for efficient implementation with speeds comparable to Prolog. In fact, HiLog implementation in XSB [29, 25] together with tabulated query evaluation offers impressive performance with negligible penalty for higher-order syntax, thereby bringing the modeling capabilities of HiLog to practical realization. The lack of sorts in HiLog, however, is somewhat of a problem in database applications, which led to a number of HiLog dialects such as DataHiLog [24]. This paper develops a comprehensive theory of sorts for HiLog. It supports HiLog's flexible higher-order syntax via a polymorphic and recursive sort structure, and it offers an easy and convenient mechanism to control the rules of well-formedness. By varying the sort structure we obtain a full spectrum of languages, ranging from classical predicate logic to the original (non-sorted) HiLog. In between, there is a number of interesting higher-order extensions of Datalog with various degrees of control over the syntax, including second-order predicate calculus with Henkin-style semantics, as described in [10]. We also discuss the benefits of using Sorted HiLog for modeling complex objects and for meta programming. Finally, Sorted HiLog can be easily incorporated into XSB, which makes its practical realization feasible.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    S. Abiteboul and S. Grumbach. COL: A logic-based language for complex objects. In Workshop on Database Programming Languages, pages 253–276, Roscoff, France, September 1987.Google Scholar
  2. 2.
    C. Beeri, S. Naqvi, O. Shmueli, and S. Tsur. Sets and negation in a logic database language (LDL). Technical report, MCC, 1987.Google Scholar
  3. 3.
    W. Chen. A theory of modules based on second-order logic. In IEEE Symposium on Logic Programming (SLP), pages 24–33, September 1987.Google Scholar
  4. 4.
    W. Chen and M. Kifer. Polymorphic types in higher-order logic programming. Technical Report 93/20, Department of Computer Science, SUNY at Stony Brook, December 1993.Google Scholar
  5. 5.
    W. Chen and M. Kifer. Sorted hilog: Sorts in higher-order logic programming. Technical Report 94/8, SUNY at Stony Brook, 1994. Available via anonymous ftp to cs.sunysb.edu in pub/TechReports/kifer/sorts.ps.Z. Google Scholar
  6. 6.
    W. Chen, M. Kifer, and D.S. Warren. HiLog: A foundation for higher-order logic programming. Journal of Logic Programming, 15(3):187–230, February 1993.Google Scholar
  7. 7.
    W. Chen and D.S. Warren. C-logic for complex objects. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), pages 369–378, March 1989.Google Scholar
  8. 8.
    A. Church. A formulation of the simple theory of types. Journal of Symbolic Logic, 5:56–68, 1940.Google Scholar
  9. 9.
    A.G. Cohn. A more expressive formulation of many sorted logic. Journal of Automated Reasoning, 3:113–200, 1987.Google Scholar
  10. 10.
    H.B. Enderton. A Mathematical Introduction to Logic. Academic Press, 1972.Google Scholar
  11. 11.
    T. Fruehwirth. Polymorphic type checking for Prolog in HiLog. In 6th Israel Conference on Artificial Intelligence and Computer Vision, Tel Aviv, Israel, 1989.Google Scholar
  12. 12.
    J.A. Goguen and J. Meseguer. Eqlog: Equality, types, and generic modules for Logic Programming. In D. DeGroot and G. Lindstrom, editors, Logic Programming, Functions, Relations, and Equations. Prentice Hall, 1986.Google Scholar
  13. 13.
    M. Hanus. Polymorphic higher-order programming in prolog. In Intl. Conference on Logic Programming (ICLP), pages 382–397, Lisboa, Portugal, 1989. MIT Press.Google Scholar
  14. 14.
    M. Hanus. Parametric order-sorted types in logic programming. Technical Report 377, Universitaet Dortmund, Fachbereich Informatik, Dortmund, FRG, January 1991.Google Scholar
  15. 15.
    P. Hill and R. Topor. A semantics for typed logic programs. In F. Pfenning, editor, Types in Logic Programming, pages 1–62. The MIT Press, 1992.Google Scholar
  16. 16.
    M. Kifer, G. Lausen, and J. Wu. Logical foundations of object-oriented and frame-based languages. Technical Report 93/06 (a revision of 90/14), Department of Computer Science, SUNY at Stony Brook, April 1993. To appear in Journal of ACM. Available in pub/TechReports/kifer/flogic.ps.Z by anonymous ftp to cs.sunysb.edu. Google Scholar
  17. 17.
    M. Kifer and J. Wu. A first-order theory of types and polymorphism in logic programming. In Intl. Symposium on Logic in Computer Science (LICS), pages 310–321, Amsterdam, The Netherlands, July 1991. Expanded version: TR 90/23 under the same title, Department of Computer Science, University at Stony Brook, July 1990.Google Scholar
  18. 18.
    I.S. Mumick and K.A. Ross. An architecture for declarative object-oriented databases. InProceedings of the JICSLP-92 Workshop on Deductive Databases, pages 21–30, November 1992.Google Scholar
  19. 19.
    A. Mycroft and R.A. O'Keefe. A polymorphic type system for Prolog. Artificial Intelligence, 23:295–307, 1984.MathSciNetGoogle Scholar
  20. 20.
    G. Nadathur and D. Miller. Higher-order horn clauses. Journal of ACM, 37(4):777–814, October 1990.Google Scholar
  21. 21.
    G. Nadathur and F. Pfenning. Types in higher-order logic programming. In F. Pfenning, editor, Types in Logic Programming, pages 245–283. The MIT Press, 1992.Google Scholar
  22. 22.
    G. Phipps, M.A. Derr, and K.A. Ross. Glue-Nail: A deductive database system. In ACM SIGMOD Conference on Management of Data, pages 308–317, 1991.Google Scholar
  23. 23.
    K.A. Ross. Relations with relation names as arguments: Algebra and calculus. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), pages 346–353, May 1992.Google Scholar
  24. 24.
    K.A. Ross. On negation in HiLog. Journal of Logic Programming, 18(1):27–53, January 1994.Google Scholar
  25. 25.
    K. Sagonas, T. Swift, and D.S. Warren. XSB as an efficient deductive database engine. In ACM SIGMOD Conference on Management of Data, pages 442–453, May 1994.Google Scholar
  26. 26.
    Konstantinos F. Sagonas and David S. Warren. A compilation scheme for HiLog. Submitted for publication, 1994.Google Scholar
  27. 27.
    G. Smolka. Logic programming with polymorphically order-sorted types. In J. Grabowski, P. Lescanne, and W. Wechler, editors, Algebraic and Logic Programming, volume 343 of Lecture Notes in Computer Science, pages 53–70. Springer-Verlag, 1988.Google Scholar
  28. 28.
    G. Smolka, W. Nutt, J.A. Goguen, and J. Meseguer. Order-sorted equational computation. Technical Report SEKI Report SR-87-14, Universität Kaiserslautern, West Germany, December 1987.Google Scholar
  29. 29.
    T. Swift and D.S. Warren. Compiling OLDT evaluation: Background and overview. Technical report, Department of Computer Science, SUNY at Stony Brook, 1992.Google Scholar
  30. 30.
    J.F. Ullman. Principles of Database and Knowledge-Base Systems, Volume 1. Computer Science Press, 1988.Google Scholar
  31. 31.
    C. Walther. A mechanical solution of Schubert's Steamroller by many-sorted resolution. Artificial Intelligence, 26:217–224, 1985.Google Scholar
  32. 32.
    J. Xu and D.S. Warren. A type inference system, for Prolog. In Joint Intl. Conference and Symposium on Logic Programming (JICSLP), pages 604–619, 1988.Google Scholar
  33. 33.
    E. Yardeni, T. Fruehwirth, and E. Shapiro. Polymorphically typed logic programs. In Intl. Conference on Logic Programming (ICLP), Paris, France, June 1991.Google Scholar

Copyright information

© Springer-Verlag 1995

Authors and Affiliations

  • Weidong Chen
    • 1
  • Michael Kifer
    • 2
  1. 1.Computer Science and EngineeringSouthern Methodist UniversityDallasUSA
  2. 2.Department of Computer ScienceSUNY at Stony BrookStony BrookUSA

Personalised recommendations