Abstract
This dissertation describes three contributions to the SACLIB computer algebra library. Using generic programming we specify the Recursively Fixed Iterator and the Structure Protecting Iterator concepts. We prove that models of these concepts cannot leak or double delete resources. Through template metaprogramming, we implement models of these concepts that provide this memory safety at compile-time and without any run-time overhead. Using aspect oriented programming, we allow unit and regression tests to be automatically obtained from an executing SACLIB program. This program instrumentation is transparent both to SACLIB maintainers and clients. This mechanism allows the automated creation of regression test suites during the execution of normal SACLIB programs. Using code generation and auto-tuning, we allow high performance implementations of the Taylor shift, de Casteljau's algorithm, and the Descartes Method for polynomial root isolation to be automatically tuned for different architectures. This allows a speedup of 10-20 over existing methods to be obtained on modern CPU architectures. The key to this speedup is the creation of a tiling scheme that allows the irregular structure of the computation to be tiled using a small number of tiles that are easy for a code generator to produce code for. The implementation of the Recursively Fixed Iterator and the Structure Protecting Iterator provide memory safety by using C++ template metaprograms that selectively disable certain classes of side effects in programs using the iterators. Other safety properties can be achieved using similar disabling of side effects. We believe that the most important continuation of the work presented here is the development of programming language techniques to allow programmers to control where their code should sit along the spectrum of the absence of side effects in pure functional languages and the unrestricted side effects of imperative languages.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.