[comp.lang.prolog] PROLOG Digest V5 #18

PROLOG-REQUEST@SUSHI.STANFORD.EDU (Chuck Restivo, The Moderator) (03/18/87)

PROLOG Digest           Thursday, 19 Mar 1987      Volume 5 : Issue 18

Today's Topics:
                        Announcement - Search,
               Implementation -  Translation & Opinion,
                      Programming - Function 91
----------------------------------------------------------------------

Date: Fri, 13 Mar 87 17:06:07 +0100
From: Juergen Wagner <unido!iaoobel!wagner@seismo.CSS.GOV> 
Subject: Search re-organization

I have written an experimental Prolog system in INTERLISP-D (on
Dandlions).  It supports hierarchically grouped databases with
user-definable access mechanisms (to be defined in INTERLISP-D). A
paper on this system has been submitted to the forthcoming IJCAI. If
anybody is interested in getting more information I can mail a copy of
the paper.

-- Juergen Wagner

------------------------------

Date: Mon, 16 Mar 87 10:01:36 PST
From: Fernando Pereira <pereira@sri-candide.ARPA> 
Subject: Translating into Prolog

John Dowding's comments about translating other formalisms into Prolog
reflect accurately our experience at SRI (eg. compiling PATR-II into
Prolog). The only technique I know to deal with large nonground terms
efficiently is the old standard, structure-sharing. Now, structure sharing
may be less efficient than copying for programs with small input terms;
however, it will win by arbitrarily large factors for arbitrarily large
nonground input terms that are created by clause invocations but not
fully scanned by other invocations. The suggestion has been made that
a copying Prolog could be modified to deal with ``lazy'' terms, large
input terms that are handled in a structure-sharing manner. No Prolog
that I know of implements this, though...

-- Fernando Pereira

------------------------------

Date: 16 Mar 87 18:50:24 GMT
From: nosc!humu!uhmanoa!uhccux!todd@sdcsvax.ucsd.edu
Subject: What is good ?

In article <2578@sunybcs.UUCP> devinney@gort.UUCP (George DeVinney) writes:
>And you can start with the basic Arity Interpreter (I think as
>cheap as turbo) and add other things in the ARITY package
>if/when you need them:

The list price for the Arity Prolog Interpreter (API) is around $400.
However, Arity Corp. gives very deep and generous discounts to
educational institutions.  If you are part of a university, give Arity
a call and talk to them about their discount program before buying.
They also have a $100 scaled down version of API for "students."  I have
not seen this student version

-- Todd

------------------------------

Date: 15 Mar 87 22:24:05 GMT
From: Randy Gordon <tektronix!reed!iscuva!randyg@ucbvax.Berkeley.EDU>  
Subject: What is good ?

Over the past couple of years, ISC's Eye to AI group has developed the
same program(Business Case Analyzer) in C, Lisp, Scheme, Ops5(Actually
FLOPS, a much superior PC clone), and both Turbo Prolog and Arity
Prolog.  (We were investigating what language to use and things got a
little carried away). Version 10.4 occupies roughly 2.75 Megabytes of
disk and 400K of source code(the rest is database information). Its
written in Arity Prolog. Turbo had nicer features(the includable
editor is sorely missed) but it just couldn't handle the load. Thats
the major problem with Turbo ...  Limitations. Limitations in number
of predicates, in amount of data, in lots of areas. Sure you can
kludge around the missing parts of Edinburgh Prolog, and in lots of
applications you don't even need to kludge. Arity is about half as
fast, but you don't need to kludge. You dont have to play with
overlays in Arity, you can include the interpreter into your compiled
code royalty free, and have up to a GIGABYTE of source code and let
the automatic virtual memory worry about overlaying. Most of the SCORE
libraries work without change(and are available on the Arity bulletin
Board)and there is user written code for such things as a forward
chaining OPS5, and a windowing system, as well as a San Marco Explorer
type tutorial(Active Prolog Tutor).  Best of all, you can move up to a
mainframe prolog with little effort.

The tech support is much better than Borlands(At least at the time I
dealt with Turbo, but they might have improved since then). There is
even an EMYCIN like expert system and a full DB2 compatable SQL
database available.

I would have to disagree about how easy it is to learn Turbo Prolog.
Turbo was the Prolog I first learned Prolog programming with, and most
of my books quickly died on the lack of dynamic programming
predicates. A beginner just has too little experience to kludge up
substitutes, and as far as I know

(and I have examined most every Prolog book out) there is no advanced
Prolog book (ala Marcus, Shapiro, Kluzniak, etc.) suitable for
learning with Turbo.

In short, Turbo is good only if you have a relatively small program or a
really experienced and talented Prolog programmer. If you just want the
specialized toolkit that comes with it, you would be better off in
Turbo Pascal.

-- Randy Gordon

------------------------------

Date: Mon, 2 Feb 87 12:00 EDT
From: BAGLEY%temple.csnet@RELAY.CS.NET
Subject: function 91   V5 #4

This is in response to the query regarding a function that always
returns the value of 91.  I believe that the function below is the one
that the query referred to.  I had an assignment dealing with such a
function in an Automata course at Temple.

I believe the assignment went something like this:

There is a function (f) which looks like this:

f(x) = x - 10,     if x is > 100 and,
f(x) = f(x) + 11,  if x is <= 100
find f(0), f(1).

I immediately thought to myself that Prolog was the way to go.  (Just
try doing it by hand, it will take you a while).  So I came up with
the following program.

foo(X,Z) :-
  X > 100,
  Z is X - 10.
foo(X,Z) :-
  X < 101,
  T is X + 11,
  foo(T,Z),
  !.

The reason why this function always evaluates to 91, is that the
smallest number that you are allowed to subtract from is 101, and the
largest number that you are allowed to add to is 100.  And since you
are always adding 11 or subtracting 10, you can only get 91.

-- Doug Bagley

------------------------------

End of PROLOG Digest
********************

mas@mtgzy.UUCP (03/20/87)

We are currently writing the requirments for an "expert" system
to do wiring designs using AT&T PC6300's. We are exploring
various languages and shells that may work out the best. One
of our requirements for the language is a good interface to
C routines and graphic libraries. Is there any body out there
who can give us their experience with the available expert
system tools, specifically in terms of space, speed, and customizing
to our domain.

Thanks in advance.

Masood Shariff & John Kee
AT&T  Middletown, NJ 07748
ihnp4!mtgzy!mas