Re: prolog and recursive descent parsing?



carl immanuel manalo <carl_thinks_cs@xxxxxxxxx> wrote:

How does prolog use recursive descent parsing to solve problems given
to it?. Does it make a graph of the parse tree or something?

The Haskell Hugs <http://haskell.org/hugs/> comes with a Mini-Prolog demo,
and fiddling around with it is great. There is also the book Sterling &
Shapiro, "The Art of Prolog". And the Usenet newsgroup comp.lang.prolog.

In brief, the Prolog engine keeps a list of statements, called goals,
and looks for a substitution that proves them from the database,
starting of with the initial query. It lops off the first goal in the
list, and checks for unifications (substitutions that make the
expressions identical) with the heads of the database statements, and
if there is a match: if the statement has empty body, it is a proof,
and if it is non-empty, the body statements are added to the list of
goals. And so, recursively.

Thus, it makes a first depth of the proof tree, also specializing the
goals (a mathematical proof of the original statement does not admit
specialization of the statements in the goal list, only those in the
database). It works like an ordinary function stack that can branch
the search for functions (when unification matches more that one
statement in the database).

Hans Aberg
.



Relevant Pages

  • Multi-Field Primary Key
    ... I configured a database for goals and objectives for my personal use to ... fields individually identify a record in tblGoalAssign). ... then be a forth field in the primary key? ...
    (microsoft.public.access.gettingstarted)
  • Role Based Security Question
    ... I have a few questions about role based security in an ASP.Net application. ... Page - Role relationships are also held in a database. ... Here are the goals we are trying to accomplish: ... the pages the user has access to into the Session object on Session_Start. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Role Based Security Question
    ... windows Authentication with Active Directory"!(minimize calls to the ... > - We have a hierarchical roles system stored in a database. ... > Here are the goals we are trying to accomplish: ... > the pages the user has access to into the Session object on Session_Start. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Role Based Security Question
    ... I have a few questions about role based security in an ASP.Net application. ... Page - Role relationships are also held in a database. ... Here are the goals we are trying to accomplish: ... the pages the user has access to into the Session object on Session_Start. ...
    (microsoft.public.dotnet.framework.aspnet)