axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] new AXIOM release(s)


From: Martin Rubey
Subject: [Axiom-developer] new AXIOM release(s)
Date: 10 Feb 2007 12:17:26 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Dear Tim, *,

root <address@hidden> writes:

> So I'm resuming my role as "Lead Developer" and will generate a new release
> in the near future.

This is great news, Tim!

I believe, in fact, that this is one of your major strenghts!

> I'll try to pick up and merge some of the changes but not the whole new build
> system as it is still experimental.

Good luck!

I'll try to document the Taylor series patch provided by Igor Khakvine, so that
it is not only included in wh-sandbox, but also in trunk. (Although I accept
help, of course)

There are quite a few "fix proposed" issues on IssueTracker. If you find time
could you walk through them and send me mail like "please send documentation
for #xxx", I'll try to make an effort.

I have also documented parts of ystream.spad, find it attached below.

Martin

\documentclass{article}

\begin{document}
\title{ssolve.spad}
\author{Martin Rubey}
\maketitle
\begin{abstract}
\end{abstract}
\tableofcontents

<<pkg: YSTREAM ParadoxicalCombinatorsForStreams>>= 
)abbrev package YSTREAM ParadoxicalCombinatorsForStreams
++ Computation of fixed points of mappings on streams
++ Author: Burge, Watt (revised by Williamson)
++ Date Created: 1986
++ Date Last Updated: 21 October 1989
++ Keywords: stream, fixed point
++ Examples:
++ References:
ParadoxicalCombinatorsForStreams(A):Exports == Implementation where
  ++ This package implements fixed-point computations on streams.
  A  :   Type
  ST ==> Stream
  L  ==> List
  I  ==> Integer
 
  Exports ==> with
    Y: (ST A -> ST A) -> ST A
      ++ Y(f) computes a fixed point of the function f.
    Y: (L ST A -> L ST A,I) -> L ST A
      ++ Y(g,n) computes a fixed point of the function g, where g takes
      ++ a list of n streams and returns a list of n streams.
 
  Implementation ==> add
 
This package uses the internal representation of [[Stream]]. There we read:

\begin{verbatim}
    -- This description of the rep is not quite true.
    -- The Rep is a pair of one of three forms:
    --    [value: S,             rest: %]
    --    [nullstream:    Magic, NIL    ]
    --    [nonnullstream: Magic, fun: () -> %]
    -- Could use a record of unions if we could guarantee no tags.

    NullStream:    S := _$NullStream$Lisp    pretend S
    NonNullStream: S := _$NonNullStream$Lisp pretend S

    Rep := Record(firstElt: S, restOfStream: %)
\end{verbatim}

<<pkg: YSTREAM ParadoxicalCombinatorsForStreams>>=  
    Y f ==
      y : ST A := CONS(0$I,0$I)$Lisp
      j := f y
      RPLACA(y,frst j)$Lisp
      RPLACD(y,rst j)$Lisp
      y
@ 

Let [[f: ST -> ST]]. We create a new stream [[y]], which we leave
uninitialized. For the moment, I cannot explain why the compiler accepts
[[CONS(0$I,0$I)$Lisp]] as a stream. However, since [[Stream]]s are lazy, %
[[f y]] doesn't compute any elements of the stream. However, if [[f]] really
depends on its input, this dependence is then captured in the [[restOfStream]]
part of the record representing the stream. The next two lines replace
[[frstElt]] and [[restOfStream]] of [[y]] by those of [[j]], thus, now
[[restofStream]] of [[y]] depends on itself.

It seems that the $n$\textsuperscript{th} element of [[f y]] should only depend
on the first $n-1$ elements of [[y]]. For example, let us simulate the
computation of the first two elements of [[Y f]]: calling [[fun()]] returns the
first element $c_1$ of [[f y]]. Thus, [[Y f]] now equals $[c_1,\dots]$. Calling
[[fun()]] again, we have to get the second element of $f [c_1,\dots]$. Suppose
this equals $c_2$, and [[Y f]] now equals $[c_1,c_2,\dots]$.

<<pkg: YSTREAM ParadoxicalCombinatorsForStreams>>=  
    Y(g,n) ==
      x : L ST A := [CONS(0$I,0$I)$Lisp for i in 1..n]
      j := g x
      for xi in x for ji in j repeat
        RPLACA(xi,frst ji)$Lisp
        RPLACD(xi,rst ji)$Lisp
      x

\section{License}
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
--    - Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--
--    - Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in
--      the documentation and/or other materials provided with the
--      distribution.
--
--    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@
<<*>>=
<<license>>

<<pkg: YSTREAM ParadoxicalCombinatorsForStreams>>
@
\end{document}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]