[comp.lang.prolog] PROLOG Digest V6 #4

PROLOG-REQUEST@SUSHI.STANFORD.EDU (Chuck Restivo, The Moderator) (01/06/88)

PROLOG Digest           Wednesday, 6 Jan 1988       Volume 6 : Issue 4

Today's Topics:
                      Implementation - Strings,
                  Puzzle - Tick & Lampson & Caution,
                         LP Library - Update
----------------------------------------------------------------------

Date: 31 Dec 87 07:17:00 EST
From: <cugini@icst-ecf.arpa>
Subject: Prolog strings, etc.

I'm not sure if this is entirely responsive to O'Keefe's call for
plausible uses of strings, but it's somewhat related.  I should say
first that I am less concerned with efficiency (although not
unconcerned) than O'Keefe appears to be, and more so with ease
of programming (what, no arccosh function ?).

Strings seem to me most useful when your application involves the
processinmg of text (surprise), and in particular when the length
of the text-chunks is important.  For instance, if you want to
print out a table with columns left or right-justified or centered;
or if you want to format a paragraph, a la troff, runoff, with
standard-size lines, possibly right-flush.  It seems to me that the
above functions are pretty complicated to achieve without knowing a
lot about the exact number of characters to be generated.
A particular problem is finding out the length, not just of atoms,
but of compound terms.

This brings up an old complaint of mine.  Why, for crying out loud,
can't there be a Prolog function like this:

   fullname(Term, String)

which, given any Term, esp. including *compound* terms, returns the
string of characters which would be generated upon writing that
Term (including, of course, the effect of current operators, etc.);
and conversely, given a string, constructs exactly the term which
'read' would have.  Clearly this term:string conversion is
implemented, since it happens on I/O all the time.  BTW this is
analogous to FORTRAN's pseudo-IO and to Lisp's format with a string
(rather than a file) as destination.  I know there are  quibbles over
whether this should simulate write or writeq or print, error
conditions, etc, but those can be worked out.

-- John Cugini

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

Date: Sat, 2 Jan 88 22:21:28 PST
From: quintus!ok@Sun.COM (Richard A. O'Keefe)
Subject: Benchmark caution.

Udi Shapiro recently sent the Prolog Digest an FCP version of the
"Puzzle" benchmark.  My concern is not with that code, but with a
minor point about Evan Tick's original program.

Shapiro says "For comparison, Evan's Prolog program runs interpreted
under Quintus Prolog Version 1.0 on the Sun-3/50 for 55 seconds, and
compiled 12 seconds."  Fortunately, he gives the original program,
so we can see what is going on.  It turns out that almost all of the
time is overhead maintaining the counter.

The same program running compiled in Quintus Prolog version 2.0 on
a Sun-3/50, took
        2.9 seconds, using library(ctr) to manage the counter
        2.8 seconds, using stubs to do nothing to the counter
So of the 12 seconds quoted, roughly 9 seconds were spent managing the
counter, which Quintus Prolog *can* do in 0.1 seconds.

All I'm saying here is that if you are benchmarking, be careful that
you are measuring the program, not the measuring instruments!

[PS:  I hope Typed FCP is described in "Concurrent Prolog:  Collected
Papers".  I ordered it from MIT Press, but haven't got it yet.]

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

Date: 12 Dec 87 01:47:10 GMT
From: thorin!unc!bts@mcnc.org  (Bruce Smith)
Subject: updated list of Prolog implementations...

Well, it's time (past time, actually) for a new LIST-OF-PROLOGs. I'll
be posting it -- almost 1K lines -- in my next message.  Here is a
quick summary.

New or updated entries:

    BIM_Prolog, Blog, CLP(R), GProlog, Horne,
    IF/Prolog, Lambda-Prolog, LISPLOG, LM-Prolog, MU-Prolog,
    NU-Prolog, POPLOG, Prolog-CRISS, Rhet, Sicstus Prolog,
    Trilogy, UNSW Prolog, WProlog

Unchanged since the last posting:

    A.D.A. Prolog, Arity/Prolog, Basser Prolog, C-Prolog, IC Prolog,
    ICL Prolog, The Logic Workbench, LOGLISP, MProlog, Modula-Prolog,
    Pascal Prolog, Prolog-1, Prolog-2, Prolog-10 and Prolog-20,
    Prolog-86, Prolog-II, Prolog-V, Prolog/P, Quintus Prolog, Salford
    Prolog, UNH Prolog, UNIX Prolog, Uranus Prolog, VPI Prolog, York
    Portable Prolog

I'd appreciate hearing from anyone who can tell me about the unchanged
entries.  Are those systems still available?  How have they changed?

Finally, I'd like to hear something from users (or implementors) of
of the following, along with any others I've missed.

    C-Prolog+
    Edinburgh Prolog (formerly NIP - New Implementation of Prolog)
    Epilog
    Parlog
    PLM (Aquarius Project at Berkeley)
    Wisdom Prolog
    Virginia Tech compiler
    Xenologic

-- Bruce T. Smith 

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

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