[comp.lang.prolog] IC-Prolog

gary@milo.mcs.clarkson.edu (Gary Levin) (01/25/89)

Does anyone have access to source for IC-Prolog or any of its
descendants?  What machines will it run on?

I was reading its description in ``Logic Programming'' by Clark and
Tarnlund, and felt that it addressed many of the features of Prolog
that have bothered me.  Many of the non-logical aspects are said to be
removed.  Arithmetic is reversible (use multiplication to find
factors, for instance).

The paper said that IC-Prolog had been used at Imperial College (where
it was written) and Syracuse.  Anyone out there have experience with
the implementation?  I am curious as to how expensive it was to remove
the non-logical bits.

-----
Gary Levin/Dept of Math & CS/Clarkson Univ/Potsdam, NY 13676/(315) 268-2384
BitNet: gary@clutx   Internet: gary@clutx.clarkson.edu

--

-----
Gary Levin/Dept of Math & CS/Clarkson Univ/Potsdam, NY 13676/(315) 268-2384
BitNet: gary@clutx   Internet: gary@clutx.clarkson.edu

cdsm@ivax.doc.ic.ac.uk (Chris Moss) (01/27/89)

In article <GARY.89Jan24170950@milo.mcs.clarkson.edu> gary@milo.mcs.clarkson.edu (Gary Levin) writes:
>Does anyone have access to source for IC-Prolog or any of its
>descendants?  What machines will it run on?

The answer is probably NO. I asked Frank McCabe, the author, last
year if he had the sources and he said he hadn't. So I haven't
included it my list of live Prolog systems ever since. Although
Imperial College doesn't appear to have a copy, it was distributed to
various people and it's quite possible that some people on the net
have copies stacked away on old mag tapes.  Any offers?

It was written in fairly standard Pascal--at the time it mainly ran on the
college Cyber machines. If it'll run on them it'll run on anything!
The main reason it was abandoned was the slowness and inconvenience of the 
pure system. For instance, to do i/o you had to construct a difference list
(without even DCG's) and associate this with a channel. Multimode 
arithmetic is simple in comparison: sum(X,Y,Z) always gives solutions.
The problem is that if it is non-deterministic you have to generate solutions
in a preconceived order, and this is nearly always useless.
(MicroProlog was a sort of descendent which has this feature minus the
nondeterminism and is cheaply available.)

The only approach I've seen which handles those issues sensibly so far is
Trilogy, and that simply keeps predicates and functions pure of side effects
while allowing you to code up those things in dirty "subr"s; that has its
advantages. You can debug predicates knowing they are pure. It doesn't help
with debugging the subr's. Arithmetic is handled via constraints.

Chris Moss.

mmh@ivax.doc.ic.ac.uk (Matthew Huntbach) (01/30/89)

In article <GARY.89Jan24170950@milo.mcs.clarkson.edu> gary@milo.mcs.clarkson.edu (Gary Levin) writes:
>Does anyone have access to source for IC-Prolog or any of its
>descendants?  What machines will it run on?

The concurrent logic languages - Parlog, Concurrent Prolog, GHC may
be considered descendants of IC-Prolog. The best reference to Parlog is
Steve Gregory's book "Parallel Logic Programming in Parlog" published by
Addison Wesley. It contains a fairly extensive description of how Parlog
evolved from IC-Prolog.

ok@aucsv.UUCP (Richard Okeefe) (02/03/89)

In article <587@gould.doc.ic.ac.uk>, cdsm@ivax.doc.ic.ac.uk (Chris Moss) writes:
> In article <GARY.89Jan24170950@milo.mcs.clarkson.edu> gary@milo.mcs.clarkson.edu (Gary Levin) writes:
> >Does anyone have access to source for IC-Prolog or any of its
> >descendants?  What machines will it run on?
> 
> The answer is probably NO. I asked Frank McCabe, the author, last
> year if he had the sources and he said he hadn't.

When I was at the University of Edinburgh we had IC-Prolog up for a while (I
think it was on the DEC-10).  I had a listing, but when I left Edinburgh I'm
afraid I threw it away.  It was a research program, not a production tool, &
was very slow indeed.  PARLOG incorporates some of the IC-Prolog ideas, but
not I think the ones gary@milo is interested in.  One idea which IC-Prolog
incorporated was to let you have several control-variants of a clause: you
could include several copies of a clause which differed only in the order of
the goals in the body, each to be used for a different instantiation pattern
(mode) of the head.  I have not seen this imitated since.  Perhaps NU-Prolog
may come closest?

Note that having a predicate
	times(A,  B, A_times_B)
is not all joy.  Successor and plus are ok, but times takes you out of the
decidable fragment of arithmetic.  Note that
	times(X, 0, 0)
has *infinitely* many solutions.  Such a thing in NU-Prolog would have to
wait until someone else comes up with a binding for X.  Even for
	times(X, Y, 720)
--720 being a rather small number-- the number of solutions is large.  In
fact, if we define times/3 to have the rationals as its domain rather than
the naturals, any query having more than one variable would have
infinitely many solutions.  This really isn't a property you want in your
primitive operations!

[This is being sent from a MicroVAX, courtesy of the University of Auckland.
 What an *atrocious* keyboard DEC have come up with!]

anv@bnr-di.UUCP (Andre Vellino) (02/07/89)

In article <187@aucsv.UUCP>, ok@aucsv.UUCP (Richard Okeefe) writes:
> Note that having a predicate
> 	times(A,  B, A_times_B)
> is not all joy.  Successor and plus are ok, but times takes you out of the
> decidable fragment of arithmetic.

Of course using only successor and times is also ok (adding plus also 
takes you out of that decidable fragment of arithmetic).

> Note that
> 	times(X, 0, 0)
> has *infinitely* many solutions. 

Surely that's ok too if you have a way of representing that many
solutions without actually computing all of them (e.g. by imposing 
constraints on floating point intervals).  That doesn't necessarily
mean delaying the evaluation until X is sufficiently bound it means
evaluating

       times(X,[0,0],[0,0])

where X is initially [minfloat,maxfloat], and verifying that this
call to times remains true every time X gets narrowed, which in this
instance will always be the case.

With this kind of idea you can compute (with reasonable efficiency)
all kinds of arithmetic expressions that have infinte solutions. For
example, if range/2 defines interval-terms, the question

?- range(C, [-34,0]), range(F, [-40,14]), F is C * 9/5 + 32.

will narrow C to [-34,-10] and F to [-29.2, 14] (which, by the way,
is roughly the temperature range in Ottawa these days).

-- Andre Vellino
Bell-Northern Research
Computing Research Laboratory
% Standard disclaimers here, about my views being my own, etc.