Re: Why not using Prolog for IF?


5 Apr 1995 23:35:48 GMT

In article <3lscm1$4cj@newsbf02.news.aol.com>, meitien@aol.com (MeiTien) writes:

|> Have anyone considered using Prolog for IF writing? Pros and Cons?

Yes, I've thought about this. Others have too - e.g. there is
a book called "Adventure in Prolog" by Dennis Merrit, which
uses a simple adventure game as a running example while
introducing Prolog.

Some pros:

* Prolog can express both attributes of single things and
relationships between more than one thing in a uniform
way. The object-oriented systems traditionally used tend
to handle the former well but not the latter.

* Most Prolog systems come with a package which makes it
easy to create very powerful parsers.

Some cons:

* It seems to be difficult to create a library which the
user can extend without knowing details of its implementation.
Often when adding a new rule it is necessary to know what
other rules there are with the same left hand side, and
insert the new rule in a particular place in the sequence,
in order to get the desired effect. This does not seem to
blend well with the idea of an include file of standard
stuff.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of Japan Inc.|
greg@cosc.canterbury.ac.nz +--------------------------------------+