3 research outputs found

    Techniques in Active and Generic Software Libraries

    Get PDF
    Reusing code from software libraries can reduce the time and effort to construct software systems and also enable the development of larger systems. However, the benefits that come from the use of software libraries may not be realized due to limitations in the way that traditional software libraries are constructed. Libraries come equipped with application programming interfaces (API) that help enforce the correct use of the abstractions in those libraries. Writing new components and adapting existing ones to conform to library APIs may require substantial amounts of "glue" code that potentially affects software's efficiency, robustness, and ease-of-maintenance. If, as a result, the idea of reusing functionality from a software library is rejected, no benefits of reuse will be realized. This dissertation explores and develops techniques that support the construction of software libraries with abstraction layers that do not impede efficiency. In many situations, glue code can be expected to have very low (or zero) performance overhead. In particular, we describe advances in the design and development of active libraries - software libraries that take an active role in the compilation of the user's code. Common to the presented techniques is that they may "break" a library API (in a controlled manner) to adapt the functionality of the library for a particular use case. The concrete contributions of this dissertation are: a library API that supports iterator selection in the Standard Template Library, allowing generic algorithms to find the most suitable traversal through a container, allowing (in one case) a 30-fold improvement in performance; the development of techniques, idioms, and best practices for concepts and concept maps in C++, allowing the construction of algorithms for one domain entirely in terms of formalisms from a second domain; the construction of generic algorithms for algorithmic differentiation, implemented as an active library in Spad, language of the Open Axiom computer algebra system, allowing algorithmic differentiation to be applied to the appropriate mathematical object and not just concrete data-types; and the description of a static analysis framework to describe the generic programming notion of local specialization within Spad, allowing more sophisticated (value-based) control over algorithm selection and specialization in categories and domains. We will find that active libraries simultaneously increase the expressivity of the underlying language and the performance of software using those libraries

    Core foundations, algorithms, and language design for symbolic computation in physics

    Get PDF
    This thesis presents three contributions to the field of symbolic computation, followed by their application to symbolic physics computations. The first contribution is to interfacing systems. The Notation package, which is developed in this thesis, allows the entry and the creation of advanced notations in the Mathematica symbolic computation system. In particular, a complete and functioning notation for both Dirac's BraKet notation as well as a full tensorial notation, are given herein. The second part of the thesis introduces a prototype based rule inheritance language paradigm that is applicable to certain advanced pattern matching rewrite rule language models. In particular, an implementation is presented for Mathematica. After detailing this language extension, it is adopted throughout the rest of the thesis. Finally, the third major contribution is a highly efficient algorithm to canonicalize tensorial expressions. By an innovative technique this algorithm avoids the dummy index relabeling problem. Further algorithmic optimizations are then presented. The complete algorithm handles linear symmetries such as the Bianchi identities. It also fully accommodates partial derivatives as well as mixed index classes. These advances in language and notations are extensively demonstrated on problems in quantum mechanics, angular momentum, general relativity, and quasi-spin. It is shown that the developments in this thesis lead to an extremely flexible, extensible, and powerful working environment for the expression and ensuing calculation of symbolic physics computations

    Abstract On the Implementation of Dynamic Evaluation

    No full text
    Dynamic evaluation is a technique for producing multiple results according to a decision tree which evolves with program execution. Sometimes it is desired to produce results for all possible branches in the decision tree, while on other occasions it may be sufficient to compute a single result which satisfies certain properties. This technique finds use in computer algebra where computing the correct result depends on recognising and properly handling special cases of parameters. In previous work, programs using dynamic evaluation have explored all branches of decision trees by repeating the computations prior to decision points. This paper presents two new implementations of dynamic evaluation which avoid recomputing intermediate results. The first approach uses Scheme “continuations ” to record state for resuming program execution. The second implementation uses the Unix “fork ” operation to form new processes to explore alternative branches in parallel. These implementations are based on modifications to Lisp- and C-based run-time systems for the Axiom Version 2 extension language (previously known as A ♯). This allows the same high-level source code to be compared using the “re-evaluation, ” the “continuation, ” and the “fork ” implementations
    corecore