Path: utzoo!attcan!uunet!husc6!rice!titan.rice.edu!phil From: phil@rice.edu (William LeFebvre) Newsgroups: comp.lang.prolog Subject: "clause" in sbprolog? breadth-first evaluation? Message-ID: <1630@kalliope.rice.edu> Date: 7 Jul 88 18:47:04 GMT Sender: usenet@rice.edu Reply-To: phil@rice.edu (William LeFebvre) Organization: Rice University, Houston Lines: 26 The book "The Art of Prolog" by Sterling and Shapiro refers to a system predicate "clause" which is defined as follows: "The goal 'clause(Head, Body)?' must be called with 'Head' instantiated. The program is searched for the first clause whose head unifies with 'Head'. The head and body of the clause and then unified with with 'Head' and 'Body'. On backtracking, the goal succeeds once for each unifiable clause in the procedure." Great. Does Stony Brook Prolog have something comparable? I've been looking and I can't find it. I am trying to write a meta-evaluator for a specific subset of Prolog programs that does breadth first evaluation rather than Prolog's depth first. But in order to write it I'm pretty sure that I need something like "clause". Can anyone help? The routines in $call cheat and call a builtin to do the dirty work. I know I can add my own builtins---can I add one that will hook me into the unification code? Or, is it possible to use a separate prref and use $db_get_clauses to get the job done? William LeFebvre Department of Computer Science Rice University