A controlling scheme for Prolog through count terms

  • Authors:
  • Young K Nam;Lawrence J Henschen

  • Affiliations:
  • Softward Development Automation Lab., Systems Engineering Research Institute/KIST, Taejon, Korea;Department of Electrical Engineering and Computer Science, Northwestern University, Evanston, IL 60208-3118, U.S.A.

  • Venue:
  • Computer Languages
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose an extension to Prolog called the count term for controlling Prolog execution. The purpose is to allow the programmers as well as the users to have greater flexibility in controlling the execution behavior of Prolog programs and for limiting the number of answers or proofs retrieved when Prolog is used as a database query language. Both syntax and operational semantics of the count term are defined. An implementation strategy based on WAM (Warren Abstract Machine) is provided. We analyze the possible meanings one might associate with the count term. The possible replacement of cut and fail by the count term is presented. The ease of analysis of programs with count terms is discussed.