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.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call