[comp.lang.prolog] Questions on Prolog

francia@nmt.edu (Guillermo A. Francia) (02/21/91)

Perhaps somebody out there can enlighten me on the following issues
about logic programming:

1) Given a logic program (assuming the absence of aliasing and cuts), 
is it possible to statically infer on what
particular clause a variable can get instantiated? If this is
undecidable, is there any safe approximation to it?

2) Given that a variable instantiation can be statically inferred, is it
possible to determine all the possible instantiation point of a variable in
the program?

I will appreciate any help that I can get. Thanks in advance.


-- 
--------------------------------------------------------------------
francia@jupiter.nmt.edu                     Guillermo A. Francia III
					    P.O. Box 2335 CS
francia@minos.nmt.edu			    New Mexico Tech	

jha@cs.ed.ac.uk (Jamie Andrews) (02/25/91)

In article <1991Feb20.231413.12025@nmt.edu> francia@nmt.edu (Guillermo A. Francia) writes:
>1) Given a logic program (assuming the absence of aliasing and cuts), 
>is it possible to statically infer on what
>particular clause a variable can get instantiated? If this is
>undecidable, is there any safe approximation to it?

     I find your question difficult to understand; this may mean
that I'm just dense about this, or it may mean that it's phrased
a bit vaguely.  (The lack of response on this newsgroup may
suggest the second explanation.)  Do you mean "given a logic
program and a query, is it possible to statically infer the
clause in the program which will effect the instantiation of a
given variable in the query"?  Also, assuming no cuts seems
reasonable, but what do you mean by "assuming no aliasing"?
No variable used in more than one place in the query?  In the
program?  (The latter would be a bit unreasonable, but the former
wouldn't be much of a restriction in general without the latter...)

>2) Given that a variable instantiation can be statically inferred, is it
>possible to determine all the possible instantiation point of a variable in
>the program?

     This might be clarified by a clarification to (1)...

>francia@jupiter.nmt.edu                     Guillermo A. Francia III

--Jamie.
  jha@cs.ed.ac.uk
"'He acts crazy, I guess.  We all act crazy.  I guess God acts crazy.'  Etc."