Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!wivax!decvax!harpo!floyd!jce From: jce@floyd.UUCP Newsgroups: net.lang.prolog Subject: prolog usage query Message-ID: <1703@floyd.UUCP> Date: Wed, 29-Jun-83 17:53:20 EDT Article-I.D.: floyd.1703 Posted: Wed Jun 29 17:53:20 1983 Date-Received: Thu, 30-Jun-83 02:21:26 EDT Lines: 25 I am a new prolog user, and have what may be a fairly simple question. As I understand it, prolog facts and assertions (i.e. ":-" stuff) are implicitly universally quantified, that is all unbound variables in a fact or assertion are universally quantified. Also, queries are implicitly existentially quantified in the sense that a query like ?-foo(X) says does there exist an X such that foo(X). How does one state existentially quantified facts and assertions, and how does one make a universally quantified query? In other words, I'd like to ask something like ?- (A X) { [foo(X), bar(X)] :- (E Y) [ baz(X,Y) ] } where "A" is "forall" and "E" is "exists". Do I have to write a grammar that recognizes such things and goes through the six step reduction to clausal form, then calls the resulting clauses as a query? If so, does anybody have such a thing that they're willing to give away? Thanks. John Eldridge floyd!clyde!jce Bell Labs Whippany, NJ (201)386-6233