[m-dev.] for review: Intro to accumulator.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Sep 22 14:52:14 AEST 1998
On 22-Sep-1998, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> % Or more generally
> %
> % :- pred p(T::IN, U::OUT, V::OUT, X::IN, Y::OUT) is SomeDeterminism.
> % p(X, Ys, Os) -->
> % minimal(X),
> % { identity(Ys) },
> % { constant(Os) },
> % threaded.
> % p(X, Ys, Os) -->
> % decompose(X, Xh, Xr),
> % process(Xh, Hs),
> % p(X, Y0s, Os),
> % { compose(Hs, Y0s, Ys) }.
> %
> % can be transformed into
> %
> % p(X, Ys, Os) -->
> % { identity(As) },
> % { constant(Os) },
> % p'(X, As, Ys, Os).
> %
> % p'(X, As, Ys, Os) -->
> % minimal(X),
> % { Ys = As },
> % threaded.
> % p'(X, As, Ys, Os) -->
> % decompose(X, Xh, Xr),
> % process(Xh, Hs)
> % { compose(As, Hs, A1s) },
> % p'(X, A1s, Ys, Os).
> %
> % As long as the compose section of the predicate obeys the
> % following constraints.
> %
> % Either
> % compose(A, B, C) <=> compose(B, A, C)
> % or
> % compose(A, B, AB), compose(AB, C, ABC) <=>
> % compose(B, C, BC), compose(A, BC, ABC)
> % identity(A), compose(A, B, C) <=> identity(A), compose(B, A, C)
This is all one (long) sentence, so `As' should be `as',
`constraints.' should be `constraints:', and `Either'
should be `either'.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list