Object oriented programming and design patterns introduce a high level of abstraction that allows us to implement and work with mathematical abstractions. Classic algebraic libraries, based on imperative programming, contain subalgorithms for working with polynomials, matrices, vectors, etc. Their main inconvenience is the dependency on types.
For example, a polynomial can be built over any kind of algebraic unitary commutative rings (R,+, *), and we would like to define the appropriate operations only once for all such rings. It is also important to operate with polynomials independently of the way their coefficients are stored. Moreover, we would like to have the possibility to add a polynomial over integer numbers to a polynomial over real numbers without explicit conversions.
We analyze and design an object oriented algebraic library, that allows working not only with concrete algebraic structures, but also with abstract algebraic structures. The advantages of this approach are given mainly by the creational design patterns, and also by reflection and dynamic loading, and by storage independence. They introduce
significant flexibility and abstraction. Using this library, we may work with abstract algebraic structures, such as: groups, rings, fields, etc., define new algebraic structures, and operate with them in abstract and concrete ways, like mathematicians do.
Related papers:
- V. Niculescu, G.S. Moldovan. Building an Object Oriented Computational Algebra System Based on Design Patterns. Proceedings of InternationalSymposium on Symbolic and Numeric Algorithms for Scientific Computing SYNASC’05, Timisoara, IEEE Computer Society Press, Romania, Sept. 2005, pp. 101-108. (ISI – Conference Proceedings Citation Index) [DOI]
- V. Niculescu, G.S. Moldovan. OOLACA: an object oriented library for abstract and computational algebra, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications OOPSLA 2004, Vancouver, BC, CANADA, ACM Press New York, NY, USA, pp. 160-162 [DOI]
- V. Niculescu. A Design Proposal for an Object Oriented Algebraic Library , Studia Universitatis “Babes-Bolyai”, Informatica, Vol XLVIII, No. 1, 2003, pp. 89-100 (.pdf).
- V. Niculescu, Teaching about Creational Design Patterns, Workshop on Pedagogies and Tools for Learning Object-Oriented Concepts, ECOOP’2003, Germany, July 21-25, 2003.
- V. Niculescu, On Choosing Between Templates and Polymorphic Types. Case-study: Representation of Algebraic Structures, Zilele Academice Clujene, 2003, pp. 71-78.
- G. Moldovan, Aspect Oriented Programming: A Case Study, Zilele Academice Clujene, 2004.