Ilya Zakharevich on Wed, 10 May 2000 16:58:52 -0400


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

Re: Extensible type system


On Fri, May 05, 2000 at 12:53:40AM +0200, Bill Allombert wrote:
> Yes, but we have to add support for rings first, and then add ideals.

I got an idea that it may be not that hard to add extensible-type
infrastructure to PARI.  (Think of accessing Macaulay data from PARI.)

Add a new type with the first word as before, the second being a
pointer to a "dispatch table" (C struct with function pointers), and
the other words type-specific.  Populate the dispatch table by
functions which call err("blah unimplemented").

What can be a minimal contents of the dispatch table?  "Convert to
GEN", "clone", "gerepile" (what will it do?), "print", "printtex",
"delete"?  I think this is enough for pilot implementation...

Starting from this, one could add more entries into the table to
optimize some operations (say, avoid convertion to PARI for some
operations).

Ilya