Next: Post-facto extensions
Up: What are our requirements for
Previous: Bounded genericity with dependent types
Recall that we need to implement algebraic structures
like: ring, commutative ring, euclidean domain, field, ...
Moreover we want to say that an euclidean domain is a commutative ring.
Hence we want INHERITANCE BETWEEN
INTERFACES.
Of course we need also INHERITANCE BETWEEN
CONCRETE CLASSES.
For instance:
- A prime finite field
/p is a particular
ring of modular integers (whose characteristic is a prime).
Hence its implementation should inherit from that
of the modular integer ring
/m (where
m is not necessarily a prime).
- A multivariate polynomial ring
R[x1, x2,..., xn]
is a particular univariate polynomial ring
(R[x1, x2,..., xn-1])[xn).
Hence its implementation should be able to reuse
that of a generic univariate polynomial ring.
Next: Post-facto extensions
Up: What are our requirements for
Previous: Bounded genericity with dependent types
Marc Moreno Maza
2004-04-27