Optimising code generation with haggies
This article describes haggles, a program for the generation of optimised programs for the efficient numerical evaluation of mathematical expressions. It uses a multivariate Horner-scheme and Common Subexpression Elimination to reduce the overall number of operations. The package can serve as a back-end for virtually any general purpose computer algebra program. Built-in type inference that allows to deal with non-standard data types in strongly typed languages and a very flexible, pattern-based output specification ensure that haggles can produce code for a large variety of programming languages. We currently use haggles as part of an automated package for the calculation of one-loop scattering amplitudes in quantum field theories. The examples in this articles, however, demonstrate that its use is not restricted to the field of high energy physics. Program summary Program title: haggies Catalogue identifier: AEGF_v1_0 Program summary: URL: http://cpc.cs.qub.ac.uk/summaries/AEGF_v1_0.html Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland Licensing provisions: GNU GPL v3 No. of lines in distributed program, including test data, etc.: 56 220 No. of bytes in distributed program, including test data, etc.: 579 010 Distribution format: tar.gz Programming language: Java, JavaCC Computer: Any system that runs the Java Virtual Machine Operating system: Any system that runs the Java Virtual Machine RAM: Determined by the size of the problem Classification: 4.14, 5, 6.2, 6.5. 11.1 Nature of problem: Generation of optimised programs for the evaluation of possibly large algebraic expressions Solution method: Java implementation Running time: Determined by the size of the problem (C) 2010 Elsevier B.V. All rights reserved.
code generation computer algebra automation of perturbative calculations