[Top][All Lists]

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

Re: [Axiom-developer] RE: algebra Makefiles with explicitdependencies, b

From: Eugene Surowitz
Subject: Re: [Axiom-developer] RE: algebra Makefiles with explicitdependencies, bootstrap, fixed-points etc.
Date: Sun, 09 Jan 2005 09:38:18 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803

It's probably irrelevant (I think it was fixed) but:
Once upon a time long long ago in the land of Axiom,
I had the experience of trying to invert the identity matrix
and getting something like: "could not coerce to Matrix Rational Integer';
that's no quote :-)

Cheers, Eugene Surowitz

Bill Page wrote:


On Saturday, January 08, 2005 8:34 PM you wrote:
The bootstrap code for SingleInteger does not contain a `one?'
function. On the second iteration the `one?' is compiled,
changing the domain vector for SingleInteger. Propagation is
exactly what is going on here.

Fantastic work! I am totally envious of your obvious skill
with lisp and the Axiom compiler code.

This thing about `one?' reminds of something that has worried
me a while in the Axiom library code. In *many* places throughout
the code there are comments like these in  si.spad.pamphlet:

--      not one? c => error "inverse does not exist"
     not (c = 1) => error "inverse does not exist"

--   one?(x)   == ONEP(x)$Lisp
  one?(x)   == x = 1

The documentation contains this terse explanation:

"The definition of {\bf one?} has been rewritten as it relies
on calling {\bf ONEP} which is a function specific to Codemist
Common Lisp but is not defined in Common Lisp."

There is no clearly stated author of this text. (Did you write
that Tim?)

Anyway, my concern about this is exactly about the creation
of circular dependencies. Surely such a basic change must
create many new dependencies? Wouldn't if have been much
better simply to provide a GCL compatible lisp expression?

There is an interesting story behind how I tracked this down.
I'll prepare some notes and document some the the lookup
functions used within the compiler runtime.

I'll report back after the build finishes.

I look forward to reading this!

Now from looking at the fixedPoint.log diffs, I think that
there must be at least one more similar propagation.

--- int/algebra/BINFILE.lsp     Fri Jan  7 13:13:39 2005
+++ int/algebra/BINFILE.NRLIB/code.lsp  Fri Jan  7 13:39:24 2005
@@ -13,7 +13,7 @@

(DEFUN |BINFILE;readIfCan!;$U;6| (|f| $) (PROG (|n|) (RETURN (SEQ (COND
((NULL (EQUAL (QVELT |f| 2) "input")) (|error| "File not in read state"))
1 "failed")) ((QUOTE T) (CONS 0 |n|)))))))))))
-(DEFUN |BINFILE;write!;$2Si;7| (|f| |x| $) (SEQ (COND ((NULL (EQUAL (QVELT
|f| 2) "output")) (|error| "File not in write state")) ((OR (QSLESSP |x| 0)
(< 255 |x|)) (|error| "integer cannot be represented as a byte")) ((QUOTE T)
(SEQ (BINARY_PRINBYTE |x|) (EXIT |x|)))))) +(DEFUN |BINFILE;write!;$2Si;7| (|f| |x| $) (SEQ (COND ((NULL (EQUAL (QVELT
|f| 2) "output")) (|error| "File not in write state")) ((OR (QSLESSP |x| 0)
(QSLESSP 255 |x|)) (|error| "integer cannot be represented as a byte"))
(DEFUN |BINFILE;position;$Si;8| (|f| $) (COND ((NULL (EQUAL (QVELT |f| 2)
"input")) (|error| "file must be in read state")) ((QUOTE T) (FILE-POSITION
(QVELT |f| 1)))))

Notice how '(< 255 |x|))' becomes '(QSLESSP 255 |x|))' during
this iteration. It is not clear to me that this change can be
related to a change in the domain vector. Or can it?


Bill Page.

Axiom-developer mailing list

reply via email to

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