swMATH ID: 823
Software Authors: David G. Richardson: Werner Krandick
Description: The SACLIB [4,7] library of computer algebra programs, originally derived from SAC-2 [3], contains reference implementations of numerous algorithms and also forms the basis of the quantifier elimination systems QEPCAD [5] and QEPCAD B [1,2]. SACLIB 2.1 contains about 70,000 lines of C-code. However, the library contains a number of memory management defects, all of which occur outside of SACLIB’s garbage collector. Memory leaks involving dynamically allocated arrays can slow down and preclude computations. Such problems have been caused by SACLIB 2.1 routines for computations with real algebraic numbers [9]; the same routines are also used in quantifier elimination. While runtime-tools such as Valgrind [11], Electric Fence [6], and Purify [8] can be used to detect some memory defects, the tools cannot guarantee their absence. This is unfortunate because dynamic arrays are used extensively in weakly typed computer algebra systems such as SACLIB. We will demonstrate SACLIB 3.0 beta [10], a C++ port of SACLIB 2.1. SACLIB 3.0 beta features an improved memory subsystem that removes the potential for any memory leaks or double deletes in applications using the system. The system encapsulates the management of arrays that are allocated on the heap or on the system stack. The system makes the arrays themselves responsible for their memory management, and enables the compiler to prevent other parts of SACLIB from managing array memory. Our innovations reduce the amount of code responsible for array memory management from 10,000 lines of code to 2,000 lines of code. Concept design and template metaprogramming allow the compiler to act as a theorem prover that ensures that SACLIB 3.0 beta builds only if the uses of the new memory management subsystem do not contain any memory leaks or double deletes. SACLIB 3.0 beta requires a C++ compiler to build. SACLIB 3.0 beta is source- and link-compatible with SACLIB 2.1. For users that wish to use SACLIB 3.0 beta from C programs, all SACLIB functions are available with C linkage. Such users will still have the potential for memory leaks and double deletes in their own C code. However, the SACLIB 3.0 beta functions are free of memory leaks and double deletes.
Homepage: http://www.mmrc.iss.ac.cn/issac2005/software/saclib.htm
Programming Languages: C
Dependencies: C++ compiler
Related Software: QEPCAD; Maple; FOXBOX; REDUCE; REDLOG; ELIMINO; CASA; PVM; AXIOM; LinBox; Theorema; Isabelle; CCured; Blitz++ library; PVS; PVMaple; MuPAD; Mathematica; NTL; CLOS
Cited in: 23 Publications

Citations by Year