axiom-developer
[Top][All Lists]

## [Axiom-developer] gui/axiom research question

 From: root Subject: [Axiom-developer] gui/axiom research question Date: Fri, 20 Jan 2006 18:19:03 -0500

```perhaps this is a good "summer of code" problem

Reading Soiffer's PhD thesis (The Design of a User Interface for
Computer Algebra Systems) raises an interesting research question.

assume you're given a standard page size (8 1/2 x 11, A4, display size)
and you have an equation to format in some understandable way
how can you format the equation to fit on one page.

the underlying "assumption" is that equations longer than one page are

we allow a variety of techniques:

* line breaks when the equation hits the edge

* common subexpression elimination when it can occur

R = (x+y) * (z+(x*y)) ==>

let M = (x+y)
R = M * (z+M)

so that you can "name" common subexpressions and lift them

* function reification

"name" a subexpression that requires a parameter,
lift it out, and substitute a parameterized term.
in a tree or DAG representation this is node-naming

* term reification

"name" a term, lift it out, and substitute
in a tree or DAG representation this is node-naming

* term summarization

replacing a (reordered) subset of the terms by a summation

* eliding leading, trailing, or middle terms

term + term + ... + term

* linearizing terms

terms, such as fractions, can be rewritten in linear form to
save lines

* constant naming

long constants replaced by short names:

R = 3.77612876767 * foo ==>

let M = 3.77612876767
R = M * foo

* pattern naming

turn 2D template structures (powers/ratios/matricies/polys) into
"named" template structures and substitute

+-   -+   +-   -+
| 1 2 |   | 5 6 |
|     | * |     |
| 3 4 |   | 7 8 |
+-   -+   +-   -+

turns into

A = Matrix((1 2) (3 4))
B = Matrix((5 6) (7 8))
MatrixProduct(A,B)

* operator names for all template structures and linear versions

* "outer structure" recognition

is it fundamentally a matrix? a polynomial? an integral?
the layout techniques could differ based on the outer structure

* "inner structure" eliding

clip out "heavy" element in a matrix so it does not cause
wide columns

* *depth*, *width*, *height* maximums as parameters

ultimately i think this boils down to a question of embedding a
tree or a DAG into a planar graph. or perhaps this is an extension
of the TeX layout algorithm with each weights assigned to the boxes?
compute the weight (area?) of a node in the tree or DAG and do some
sort of weight-reduction?

t

```