SymbolicC++ Book Cover

Computer Algebra

with

SymbolicC++

World Scientific, Singapore, 2008.
ISBN: 978-981-283-360-0

Yorick Hardy
Department of Mathematical Sciences
University of South Africa

Tan Kiat Shi
Ilog Co., Ltd, Singapore

Willi-Hans Steeb
International School for Scientific Computing
University of Johannesburg, South Africa

SymbolicC++ 3

Some of the improvements and features of the new SymbolicC++:
  1. Source code completely rewritten.
  2. All memory management in a single class
  3. Rationals, Verylong, double and complex completely integrated
  4. Symbolic matrices and vectors completely integrated
  5. Improved algorithms for simplification, expansion, chain rule etc.
  6. Extensive use of STL
Development version (mercurial)

Current version (2010-09-15):

Book version:

Other documentation:

Users of SymbolicC++ with GCC on 64-bit may need to use the -fno-elide-constructors flag.


An introduction to SymbolicC++ and several applications can be found in:

Continuous Symmetries, Lie Algebra, Differential Equations and Computer Algebra
World Scientific, Singapore, 2007
ISBN: 13-978-981-270-809-0


SymbolicC++ uses C++ and object-oriented programming to develop a computer algebra system. Object-oriented programming is an approach to software design that is based on classes rather than procedures. This approach maximizes modularity and information hiding. Object-oriented design provides many advantages. For example, it combines both the data and the functions that operate on that data into a single unit. Such a unit (abstract data type) is called a class.

We use C++ as our object-oriented programming language for the following reasons: C++ allows the introduction of abstract data types. Thus we can introduce the data types used in the computer algebra system as abstract data types. The language C++ supports the central concepts of object-oriented programming: encapsulation, inheritance, polymorphism (including dynamic binding) and operator overloading. It has good support for dynamic memory management and supports both, procedural and object-oriented programming. A less abstract form of polymorphism is provided via template support. We overload the operators

  =, +,  -, *,  /
  

etc for our abstract data types, such as verylong integers, rational numbers, complex numbers or symbolic data types. The vector and matrix classes are implemented on a template basis so that they can be used with the other abstract data types.

Another advantage of this approach is that, since the system of symbolic manipulations itself is written in C++, it is easy to enlarge it and to fit it to the special problem at hand. The classes (abstract data types) are included in a header file and can be provided in any C++ program by giving the command

#include "ADT.h"

at the beginning of the program.

For the realization of this concept we apply the following features of C++:

  1. The class concept
  2. overloading of operators
  3. overloading of functions
  4. inheritance of classes
  5. virtual functions
  6. function templates
  7. class templates
  8. Standard Template Library

The developed system SymbolicC++ includes the following abstract data types (classes):

Suitable type conversions between the abstract data types and between abstract data types and basic data types are also provided.

The advantages of SymbolicC++ are as follows:

  1. Object-oriented design and proper handling of basic and abstract data types.
  2. The system is operating system independent, i.e. for all operating systems powerful C++ compilers are available.
  3. The user is provided with the source code.
  4. New classes (abstract data types) can easily be added.
  5. The ANSI C++ standard is taken into account.
  6. The user only needs to learn C++ to apply the computer algebra system.
  7. Assembler code can easily be added to run on a specific CPU.
  8. Member functions and type conversion operators provide a symbolic-numeric interface
  9. The classes (abstract data types) are included in a header file and can be provided in any C++ program by giving the command
    #include "ADT.h"
    at the beginning of the program.
  10. The classes can be linked with Parallel Virtual Machine (PVM).
  11. Standard Template Library can be used with SymbolicC++.