Optimising code generation with haggies

Abstract This article describes haggies , 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 haggies can produce code for a large variety of programming languages. We currently use haggies 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

[1]  Erwin Fehlberg,et al.  Klassische Runge-Kutta-Formeln vierter und niedrigerer Ordnung mit Schrittweiten-Kontrolle und ihre Anwendung auf Wärmeleitungsprobleme , 1970, Computing.

[2]  Tanju Gleisberg,et al.  Automating dipole subtraction for QCD NLO calculations , 2007, 0709.2881.

[3]  John Cocke,et al.  Register allocation via graph coloring , 1981 .

[4]  Michael H. Seymour,et al.  A general algorithm for calculating jet cross sections in NLO QCD , 1996 .

[5]  Alan H. Karp,et al.  A variable order Runge-Kutta method for initial value problems with rapidly varying right-hand sides , 1990, TOMS.

[6]  Vivek Sarkar,et al.  Linear scan register allocation , 1999, TOPL.

[7]  Wen Lea Pearn,et al.  (Journal of Computational and Applied Mathematics,228(1):274-278)Optimization of the T Policy M/G/1 Queue with Server Breakdowns and General Startup Times , 2009 .

[8]  Giovanni Ossola,et al.  Reducing full one-loop amplitudes to scalar integrals at the integrand level , 2006, hep-ph/0609007.

[9]  L. Dagum,et al.  OpenMP: an industry standard API for shared-memory programming , 1998 .

[10]  Costas G. Papadopoulos,et al.  CutTools: a program implementing the OPP reduction method to compute one-loop amplitudes , 2007, 0711.3596.

[11]  Donald E. Knuth The art of computer programming: fundamental algorithms , 1969 .

[12]  T. Hahn,et al.  Generating Feynman Diagrams and Amplitudes with FeynArts 3 , 2001 .

[13]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[14]  Donald E. Knuth,et al.  The Art of Computer Programming, Volume I: Fundamental Algorithms, 2nd Edition , 1997 .

[15]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[16]  G. Zanderighi,et al.  On the numerical evaluation of one-loop amplitudes: the gluonic case , 2008, 0805.2152.

[17]  Jorge J. Moré,et al.  Algorithm 566: FORTRAN Subroutines for Testing Unconstrained Optimization Software [C5], [E4] , 1981, TOMS.

[18]  C. L. Hamblin,et al.  Computer Languages , 1985, Aust. Comput. J..

[19]  Yoshimasa Kurihara,et al.  GRACE-NLO for the LHC , 2008 .

[20]  J. Dormand,et al.  A family of embedded Runge-Kutta formulae , 1980 .

[21]  L. Shampine,et al.  A 3(2) pair of Runge - Kutta formulas , 1989 .

[22]  T. Binoth,et al.  golem95: A numerical program to calculate one-loop tensor integrals with up to six external legs , 2008, Comput. Phys. Commun..

[23]  Jos Vermaseren,et al.  What is new in FORM , 2006 .

[24]  John Cocke,et al.  A methodology for the real world , 1981 .