axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] Data structure for object definition


From: root
Subject: Re: [Axiom-mail] Data structure for object definition
Date: Fri, 29 Sep 2006 14:09:44 -0400

> > Hi, 
> > 
> >   Is there an accessible algebra in Axiom that holds the
> > internal representation of Axiom object?
> > 
> > Assume, I have
> > 
> >      (x:% - %:y):% == reduc(x -$Rep y, commonk(x, y))
> > 
> > Who to I get hold on the internal representation of "-"?
> > 
> > (SEX an EXPR do not see, to give me  what I want).
> 
> I'm a little worried: what do you really want to do? This doesn't
> look like the way things should be done in Axiom or Aldor. Could you
> give an example, i.e., input plus desired output that explains *why*
> you want access to the internal representation?

Actually, introspection would be quite useful when trying to develop
a general purpose routine for line-wrapping or equation formating.

The line wrapping problem could take two paths. 

Path 1 is to hierarchically organize the expression and ask each 
subexpression to format itself into a multi-line buffer. If the
subexpression exceeds the linelength and indentation depth requirements
you can recurse into the expression, split it on operators, and retry.

Path 2 is to create a "WHERE" package. The WHERE package would extract
subexpressions from an expression and print is as:

   f(x) = a op b
     where a = expr1
           b = expr2

etc.

t





reply via email to

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