Next: , Previous: Top, Up: Top


1 Introduction

The theoretical and practical treatment of partial differential equations is a highly complex domain of mathematics with a multitude of possible phenomena. Consequently, the design of optimal numerical methods is also difficult, and the efficient implementation of such methods is an even more challenging problem. Therefore, originally, software in this domain could handle only very special problems well and was not applicable to other situations. But this changed in the last decade, when more and more software packages appeared, claiming to be multi-purpose tools for solving partial differential equations.

Femlisp is such a multi-purpose tool. But in contrast to other PDE solvers which are mostly written using machine-oriented languages like Fortran, C, or C++, it is written in Lisp, which is a language long known from research in artificial intelligence.

Lisp is the second-oldest high-level computer language after Fortran. It is a very flexible and powerful language, and a lot of problems arising in computational science were first solved using Lisp as a vehicle. Besides being well-suited for solving problems in artificial intelligence (AI), the world's first computer algebra system, Macsyma, was implemented in Lisp, and, more recently, Lisp was used in the package Kenzo to solve difficult problems in algebraic topology. Lisp is also the language of Autocad and the editor Emacs. Astonishingly, up to now, Lisp has not been a mainstream language. The reasons for this are mostly historical: in the first decades of computer history, resources were scarce and a language for which the first implementations were interpreters, which has automatic memory management as an essential component, and which is used best inside large development environments could not compete with lightweight languages for the computationally easy problems which were tackled at that time.

Nowadays, the situation is drastically different. Computing power has increased tremendously, thus making it possible to have powerful Lisp environments on personal computers while still using only a fraction of the available memory. Due to Java, automatic memory management has become a mainstream feature. In the meantime, Lisp itself has grown up into Common Lisp, which is a powerful object-oriented language for handling real-world applications, and for which many implementations support native code compilation.

Consequently, using Lisp for problems outside its original realm of artificial intelligence is a very natural choice today, see (Fateman et al, 1995), (Fateman 2001), (Neuss 2002). Comparing Femlisp with other PDE toolboxes, we observe the following advantages which cannot be easily obtained using conventional languages like Fortran, C, or C++:

  1. Femlisp is interactive. Toolboxes written in conventional languages have to implement this feature themselves or to be linked with some scripting language like Perl or Python. In any case, an artificial interface between scripting level and application language appears, which is not easy to maintain.
  2. The editor is integrated in a way that is very difficult to achieve for conventional languages. For example, argument lists of functions appear when typing, and the documentation of functions and variables is available at a keystroke. Also, the debug cycle is as short as it can possibly be: changing a function, recompiling it separately, and testing it in the running environment is usually a matter of only a few keystrokes and fractions of a second runtime.
  3. Lisp is very expressive, and programming techniques can be used which would introduce a large overhead in conventional languages. This leads to a concise representation of the underlying mathematical ideas and therefore to a very short and maintainable source code. To achieve maximum benefit, the source code is available under a liberal open source license.