How do you like Turbo-Prolog? 
Author Message
 How do you like Turbo-Prolog?

I'm just starting with prolog, and for $99 Turbo-Prolog looks
attractive.  I'd like to know what people think of it.

        -thanks,
--

                -Steve Miller    ihnp4!bellcore!thumper!steve

"The Fantasy Factory" is a trademark of Image Space, a New Jersey corporation.



Mon, 20 Jul 1992 11:30:00 GMT  
 How do you like Turbo-Prolog?

Quote:
> /***** iaoobelix:comp.lang.pro / thumper!steve /  5:30 pm  Feb 28, 1987*/
> I'm just starting with prolog, and for $99 Turbo-Prolog looks
> attractive.  I'd like to know what people think of it.

>            -Steve Miller    ihnp4!bellcore!thumper!steve

Roughly speaking, TurboProlog is Pascal with Prolog syntax.
(Sorry, I couldn't resist (:-)) I'd prefer a *real* Prolog.

Juergen Wagner,                (USENET)  ...seismo!unido!iaoobel!wagner
                                    Fraunhofer Institute IAO, Stuttgart

Disclaimer:
   "The opinions expressed herein are not necessarily those of my
   employer, not necessarily mine, and probably not necessary."



Mon, 17 Aug 1992 08:12:00 GMT  
 How do you like Turbo-Prolog?

Quote:

>Roughly speaking, TurboProlog is Pascal with Prolog syntax.
>(Sorry, I couldn't resist (:-)) I'd prefer a *real* Prolog.

Look, whenever I mention to anyone that I'm using Turbo-Prolog, I get
snickers and a reply just like yours.  No one ever gives any real evidence
as to WHY Turbo-Prolog is not "real" prolog.
I'm using Turbo for my homework projects in a compiler class; I find it's
environment far far more pleasant than using cprolog on an overloaded VAX.
I'm writing a compiler, and so far my difficulties are about 80% with the
Prolog language itself and 20% with differences between Turbo and standard
Prolog.
The major difference between Turbo and regular prolog:
  *  No user-definable operators
  *  No grammar-rules (but this is just a syntactic transformation)
  *  Type-checking

Most of the abuse Turbo gets is based on the last one.  It puts me in mind
of fortran or C hackers looking at Pascal and saying "oh, gross, you have
to *declare* variables and *keep track of types*".  The type-checking doesn't
seem to limit the power of the language, and there are good things to be
said for spelling out your data-structures at the beginning of the program.

So please ... can someone who has honestly sat down and USED Turbo-Prolog
tell me precisely why it's not really Prolog at all.  I've been using it
for a while now and it looks just like Prolog to me ...

--
I try my hand, I try my hand at sculpture            --Peter Alfke

It stands all by itself, a monument to culture
I stand beside myself and still I'm next to nothing.       ::Savage Republic::



Mon, 17 Aug 1992 02:06:00 GMT  
 How do you like Turbo-Prolog?

[This is a review of Turbo Prolog sent out in response to Peter Alfke's
 recent comments on net.lang.prolog.  The review was originally sent to the
 AI-DIGEST many months ago, but I believe that net.lang.prolog would also
 be a good place for it!]

[Also, in response to Peter's comments about the speed of the vax --
 Cprolog runs on all of our suns, at (*real*) speeds (see notes below)
 that are much better than Turbo's]

[ Caveats to remember when reading this review: I have *not* read all
 of the manual, nor used it on many programs.  Views expressed are
 from the perspective of someone who has done the code generation and
 evaluatable predicates for a high speed (~900 KLips on one processor
 of a IBM 3090)  prolog compiler.  I have no affiliation with
 Borland, and only a (*very*) indirect affiliation with IBM  -- MON]

From a local software store we purchased Turbo Prolog over the weekend.
It came as a cellophane wrapped book with a couple of floppies.  It cost
$69.95, list of $99.

The enviromnent was very nice.  There was a window for the editor, goals
debugging information and messages.  This seemed well done, and responded
reasonably well (I am not used to IBM-PC's.)

The unfortunate part was the Pascal-ization of the language.  Everything
had to be typed (they called it domains).  As far as I could tell, lists
had to be composed soley of other lists or elements all of one type.  One
had to define the possible terms (giving the functor) that could be
arguments to a predicate.  It seemed impossible to write generic predicates
for dealing with arbitrary types of terms.

        Ex:  to have a term that could be a 'symbol' (atom) or an integer
        one had to do this:
                domains
                        aori = a(atom) or i(integer)
        It was not possible to just use an atom or an integer as a subterm...

Typing each subterm of a term is not my idea of Prolog.

After about an hour we got the 'standard' timing example of naive
reverse running  (Some people have used other, non-environment-creating
samples.  This is an unfair comparison).  It did 496 unifications in
aproximately 11/100 of a second.  This amounts to a speed of a little
under 5 Klips.  Considering that they do not need to do 'real' unification
(since everything is pre-typed, and thus can be reduced to a simple test),
this speed is not particularly impressive.

Also, and most seriously (thanks to Fernando Pereira) there  are two more
*MAJOR* problems:  the logical variable doesn't really
exist: it is a runtime error to do variable-to-variable unifications
as in  
                p(X,X).

                ?- p(X,Y), p(X,a).

And, it is not possible to assert clauses with variables.

In summary, I would say that there advertising is at best a
misrepresentation.  They are not selling a 'Prolog' system!
(If I owned a TM on the word 'Prolog', I would be tempted to sue them!)


Caltech 256-80                  818-356-6771 (afternoons,nights)
Pasadena CA 91125               Beach Bums Anonymous, Pasadena President

        "Life's a beach, then you graduate"



Mon, 17 Aug 1992 03:19:00 GMT  
 How do you like Turbo-Prolog?

Maybe I'm just spoiled rotten from living where Prolog was first
implemented, but having used three generations of Prolog interpreters I
honestly can't say that Turbo is what I think of as Prolog. When I think
Prolog, I think 'Edinburgh Syntax' - which is, after all, the de facto
standard. The notion of type checking, call it what you will, just
doesn't seeem to me to be part of Prolog.

The article forwarded by Mike Newton seem to ascribe some of these
modifications to  Fernando Pereira. If he was reponsible for these, I
must admit to some surprise since he was involved in the early
implementations of DEC-10 Prolog, and really should have known better....




Mon, 17 Aug 1992 09:40:00 GMT  
 How do you like Turbo-Prolog?

Quote:
> /***** iaoobelix:comp.lang.pro / thumper!steve /  5:30 pm  Feb 28, 1987*/
> > I'm just starting with prolog, and for $99 Turbo-Prolog looks
> > attractive.  I'd like to know what people think of it.

> >               -Steve Miller    ihnp4!bellcore!thumper!steve

> Roughly speaking, TurboProlog is Pascal with Prolog syntax.
> (Sorry, I couldn't resist (:-)) I'd prefer a *real* Prolog.

> Juergen Wagner,                (USENET)  ...seismo!unido!iaoobel!wagner
>                                     Fraunhofer Institute IAO, Stuttgart

This is SILLY. It would be better to say Prolog with Pascal type structure.
Clearly its biggest failing is that it doesn't have a polymorphic type
checker (a la Mycroft/O'Keefe paper for instance). But its type system
is better than theirs in some respects (one can declare subdomains which
do get some checking).

Personally I doubt that I'd use Turbo much, but I'm real interested to
see how much people like the addition of typechecking. If you think you
can't write REAL programs in Turbo, look at their program disk. There's
a neat natural language system there that is efficient and extensible.
-- In case you want to know, they get round the lack of metacall easily
by effectively defining "call" for all the queries (in the internal
query language) they want to do.

Quote:
> Also, and most seriously (thanks to Fernando Pereira) there  are two more
> *MAJOR* problems:  the logical variable doesn't really
> exist: it is a runtime error to do variable-to-variable unifications
> as in      
>            p(X,X).

>            ?- p(X,Y), p(X,a).

This is plain WRONG! I have just typed and executed the following program:

        domains
                rsymbol = reference symbol
        predicates
                eqn(rsymbol, rsymbol)
        clauses
                eqn(X,X).

and executed the following queries with the results (more or less
verbatim from the screen):

Goal :  eqn(X,foo)
        X=foo
        1 solution

Goal :  eqn(X,X)
        X=_
        1 solution

Goal :  eqn(X,Y)
        X=_,  Y=_

Goal :  eqn(X,Y), eqn(Y,foo)
        X=foo, Y=foo
        1 solution

I think this shows the pluses and minuses of TurboProlog.
  a. eqn only works on symbols (atoms) not other things (as it stands).
It's impossible to write a full "eq".
  b. You must inform it (by "reference") if you want full unification -
i.e. unbound variables in the result.
  c. Leaving out the reference in the domain gives a run-time error for
the second and after goals.
  d. It's got MASSES of error messages - far more, and I dare say, far
better than most other Prolog systems.
  e. The domain and predicate declarations are good documentation but
pretty onerous. In particular it's wrong to declare but not finish a
definition - Not good for top-down program development.

Quote:
> The article forwarded by Mike Newton seem to ascribe some of these
> modifications to  Fernando Pereira. If he was reponsible for these, I
> must admit to some surprise since he was involved in the early
> implementations of DEC-10 Prolog, and really should have known better....



Before this gets too much circulation, Fernando was CRITICIZING not
IMPLEMENTING Turbo (and whether he was cited correctly I don't know.
Were you, Fernando?) It was actually implemented by some guy in Denmark
whose name I forget right now.

To sum up, I'm NOT advocating Turbo, but if you want to criticize
get your facts right!

Chris Moss, Imperial College, London.



Mon, 17 Aug 1992 08:29:00 GMT  
 How do you like Turbo-Prolog?

Quote:
>>> Also, and most seriously (thanks to Fernando Pereira) there  are two more
>>> *MAJOR* problems:  the logical variable doesn't really
>>> exist: it is a runtime error to do variable-to-variable unifications

By "thanks to Fernando Pereira" I meant "thanks to him for pointing
this out to me".  I believe he was as upset as I was about the changes.

- mike newton



Mon, 17 Aug 1992 17:27:00 GMT  
 How do you like Turbo-Prolog?

Quote:

>Maybe I'm just spoiled rotten from living where Prolog was first
>implemented, but having used three generations of Prolog interpreters I
 ...


I'm confused... you live in Marseille but your e-mail address is Edinburgh?
(Or does "from living" mean "from having lived [in Marseille]"?)


Mon, 17 Aug 1992 06:26:00 GMT  
 How do you like Turbo-Prolog?

Quote:
> /***** iaoobelix:comp.lang.pro / cit-vax!newton /  9:19 am  Mar  8, 1987*/

> The unfortunate part was the Pascal-ization of the language.  Everything
> had to be typed (they called it domains).  As far as I could tell, lists
> had to be composed soley of other lists or elements all of one type.  One
> had to define the possible terms (giving the functor) that could be
> arguments to a predicate.  It seemed impossible to write generic predicates
> for dealing with arbitrary types of terms.

It is even impossible to write certain applications (e.g. parsers for
natural language) that have to use lists containing arbitrary objects
(i.e. symbols, lists, terms, ...).

Quote:
> Typing each subterm of a term is not my idea of Prolog.

I absolutely agree.

Quote:
> Also, and most seriously (thanks to Fernando Pereira) there  are two more
> *MAJOR* problems:  the logical variable doesn't really
> exist: it is a runtime error to do variable-to-variable unifications
> as in      
>            p(X,X).

>            ?- p(X,Y), p(X,a).

> And, it is not possible to assert clauses with variables.

My opinion is that everybody working with real Prologs who tried to use
TurboP????? encounters the same kind of problems as soon as one starts to
write a typical Prolog program. Therefore, my flame about TurboP????? was
just the conclusion, not the explanation.

Most of the problems come from the fact that you have to declare variables.
Of course, it is possible in programming languages like C or some versions
of PASCAL to use loopholes or type casts to get around type checks and to
change an int into a pointer to char or whatever. I agree, this can be
very dangerous and the programmer has to be aware of them. On the other hand,
languages like Lisp or Prolog *ARE NOT TYPELESS* and *DO HAVE TYPE-CHECKING*.
The only difference is that in PASCAL or C or (for heaven's sake) FORTRAN
the program (or each individual function call) has to know about the types
of any data objects involved, whereas in Lisp or Prolog you have objects
knowing of which type they are. This requires, of course, an entirely
different (in fact, a much more sophisticated) memory management and
garbage collection, what might have been the reason for Borland to write
a TurboP????? rather than a ?????Prolog.

You see, both PASCAL and Prolog do have type-checking but while PASCAL
does checks at compile-time (and is able to do so because of the presence
of declarations), Prolog (and other AI languages) use a dynamic type-
checking at runtime, on one hand releaving the programmer of caring about some
problems with type conflicts, and on the other hand enabling him/her to
write generic functions/predicates.

By the way, I am using CProlog1.5+ on Suns and it runs pretty fast.

Juergen Wagner,                 (USENET)   ...!unido!iaoobel!wagner
("Gandalf")                   Fraunhofer Institute IAO, Stuttgart

Note: "God is REAL (unless declared INTEGER)."

...vanilla disclaimer...



Mon, 17 Aug 1992 10:54:00 GMT  
 How do you like Turbo-Prolog?

Apologies to Steve Miller and Fernando Pereira, if any offence is taken
by my misreading of Steve's article.

Also thanks to Chris Moss, for setting the record straight.

        --Rick



Mon, 17 Aug 1992 12:25:00 GMT  
 
 [ 18 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Interfacing Turbo Prolog to Turbo Pascal of Turbo C

2. Linking Turbo Prolog v2.0 with Turbo C

3. Turbo Prolog / Turbo C connecting problem

4. Porting Turbo Prolog programs to ISO Prolog

5. Syntex: Turbo Prolog and SWI-Prolog

6. Syntex: Turbo Prolog and SWI-Prolog

7. Learning prolog with Turbo Prolog

8. APL interpreter impl. in Turbo Prolog

9. Do you consider yourself a TURBO PROLOG expert?

10. Is Borland Turbo Prolog for DOS available anywhere.?

 

 
Powered by phpBB® Forum Software