Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!swrinde!mips!news.cs.indiana.edu!ux1.cso.uiuc.edu!boas.cogsci.uiuc.edu!sutanto From: sutanto@boas.cogsci.uiuc.edu (Herry Sutanto) Newsgroups: comp.lang.prolog Subject: Re: SICStus Prolog expert, HELP! Keywords: SICStus Prolog, freeze, call_residue Message-ID: <1991May24.173820.6783@ux1.cso.uiuc.edu> Date: 24 May 91 17:38:20 GMT References: <1991May23.194951.24587@ux1.cso.uiuc.edu> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 40 I wrotes: >I have a question for SICStus Prolog expert. >It is related to freeze predicate. The question is how to get *all* >blocked goals so far? >What I need is similar to call_residue/2 but return all blocked goals >from top level to current point. call_residue(+Goal, ?Vars) only >returns blocked subgoal(s) of the execution of Goal, not *all* of the >blocked goals to that point. >I tried to use setof/2 with frozen/2 but they always return TRUE instead. >Herry Sutanto >sutanto@cs.uiuc.edu Thank to all who replies my previous posting, to make the problem clear, here is an example where I need this kind of predicate: Suppose I want to have a predicate called less_than( X, Y ) which return true if X is less than Y. If at least one of the arguments is uninstantiated, this goal will be blocked. But I also want to check whether there are any frozen goals which related to these variables, if there are I want to check right away whether the new frozen goal is consistent with all the previous frozen goal. So, if there are previously frozen goal less_than( Y, Z ) and less_than( Z, X ), I can tell that less_than(X, Y) is false (even none of the variables are instantiated). Herry Sutanto sutanto@cs.uiuc.edu -- -hs-