[net.lang.prolog] A Hack for DEC-10 Prolog Input

O'KeefeHPS@sri-unix.UUCP (09/17/84)

From:  O'Keefe HPS (on ERCC DEC-10)

I've often moaned about the "fact" that DEC-10 Prolog
doesn't let you have more than one channel reading from
the same file.  While I had realised that in C-Prolog I
could say

        see('fred')             for channel A
        see('./fred')           for channel B
        see('../fred')          for channel C

and so on (just stick N "./"s after the last "/"), I didn't
realise that something similar could be done in DEC-10 Prolog.
But it can!

Use     see('fred')             for channel A
        see('Fred')             for channel B
        see('FRED')             for channel C

and so on.  The Bottoms-10 operating system ignores case,
but DEC-10 Prolog doesn't!

Myself, I class this as a hack, but if you have a program
which has to keep its channels intact despite the user opening
and closing things at least you can use all upper case yourself
and force the user's file names to lower case.

I discovered this while working on the input/output section of
my "draft standard for Prolog built in predicates".  I've come
up with a new set of basic operations which should be generally
implementable and which have some nice properties, and to excuse
this decided to write a backwards compatibility library.  While
testing this, I tried out a number of strange things, such as
tell(a+b).  (It just fails.)  I'm prepared to defend almost any
aspect of DEC-10 Prolog at length, but not the file handling
commands.

I've now got a copy of the BSI "draft standard".  If it can't
be shot down in the early stages it could be a disaster.  It has
deleted  useful things, changed things with no motivation given,
and includedthings such as 'NOLC', %(, %), which are agreed to be
obsolete, and [excuse me, I have to extinguish some flames]
Amongst other things, it includes the DEC-10 file handling
commands even more vaguely worded and with no indication that
there is any  problem here.  It'sonly intended as a place to
start, thank goodness (though either ofClocksin & Mellish or the
DEC-10 manual would have been a better basis, as being less
vague and saying *something* that suggests  there might be a
difference between (A,B) and (A;B)).  There are N groups working
away on Prolog implementations; one here, one at Cambridge,
Imperial with their thing I mentioned a little while back,
the Weizmann Institute, Quintus, ANL, Melbourne, you name it.
If nothing is done about it, each of these groups is going to do
THEIR thing, not YOURS, which will greatly lengthen the time it
takes to produce a standard, and will make it hard for you to
move your programs from Wisdom Prolog to Quintus Prolog (or vice
versa).  It is quite clear that the DEC-10 file handling commands
are not satisfactory.  If you USE Prolog, as opposed to being
concerned with logic programming generally, the question of what
I/O looks like affects YOU.  I've tried to get some discussion of
this before, and the only response I got was a message from
Fernando Pereira saying that yes, DEC-10 Prolog I/O was
regrettable and should be replaced.  But now time is running out.
If we can't get some user input from the community, I'm afraid
you'll deserve the I/O you get.

Which brings me to another point: I don't know when the working
party will be set up, and I doubt that I'll be in it.  But I should
be in some sort of touch with it.  This would be a really good
place to discuss the standard, if there was any likelihood of
two-way commun-ication.  To judge whether there'll be any point
in me sending such information to the Digest, could readers
please send in opinions on

- whether there should be a standard at all?
  Admittedly, Prolog is not an ideal logic (or any other
  flavour) programming language, but that's not the issue.
  We're not talking about "the standard logic programming
  language", we're talking about Prolog-85.  Is Prolog a
  sufficiently mature language to have a standard (like
  MUMPS or BASIC)?


- what sort of standard should there be?

a) a minimal standard slightly less than Clocksin & Mellish
b) a full standard extending DEC-10 Prolog
c) a Nucleus+modules standard (like COBOL) which gets the
   best of a and b, but you have to check which modules a
   particular implementation has
d) a minimal standard plus libraries (where the libraries
   may not be realisable in the minimal language, E.g.
   setof/3 in C&M "core" Prolog)
e) idunno what goes here, it's 1:40am my time, you think
   of something

- how should the standard be expressed?

a) English + BNF
b) two-level grammars
c) meta-circular interpreter
d) Meta-IV
e) an interpreter written in Augusta?
   (you know what I mean...)
f) you name it

- the standard's going to be BSI, not (yet) ISO or ANSI.
  do you care?  would you be prepared to use a BSI standard?

We really do have to think about all this.  The beaurecratic
mills are {whoops, bureaucratic, I always get that wrong}
starting to turn, and so far they've been turning blindly.
What kind of Prolog do YOU want?  (If the standard looks
exactly like Quintus Prolog I will be more than happy.
I'm sure you will be too, but we may have to struggle a
bit to ensure this desirable result.)

O'KeefeHPS@sri-unix.UUCP (09/17/84)

From:  O'Keefe HPS (on ERCC DEC-10)

I've often moaned about the "fact" that DEC-10 Prolog
doesn't let you have more than one channel reading from
the same file.  While I had realised that in C-Prolog I
could say

        see('fred')             for channel A
        see('./fred')           for channel B
        see('../fred')          for channel C

and so on (just stick N "./"s after the last "/"), I didn't
realise that something similar could be done in DEC-10 Prolog.
But it can!

Use     see('fred')             for channel A
        see('Fred')             for channel B
        see('FRED')             for channel C

and so on.  The Bottoms-10 operating system ignores case,
but DEC-10 Prolog doesn't!

Myself, I class this as a hack, but if you have a program
which has to keep its channels intact despite the user opening
and closing things at least you can use all upper case yourself
and force the user's file names to lower case.

I discovered this while working on the input/output section of
my "draft standard for Prolog built in predicates".  I've come
up with a new set of basic operations which should be generally
implementable and which have some nice properties, and to excuse
this decided to write a backwards compatibility library.  While
testing this, I tried out a number of strange things, such as
tell(a+b).  (It just fails.)  I'm prepared to defend almost any
aspect of DEC-10 Prolog at length, but not the file handling
commands.


***Sender closed connection***

=== Network Mail from host su-score.arpa on Tue Sep 18 02:44:24  ===