Advertisement

Generating Optimal Code Using Answer Set Programming

  • Tom Crick
  • Martin Brain
  • Marina De Vos
  • John Fitch
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5753)

Abstract

This paper presents the Total Optimisation using Answer Set Technology (TOAST) system, which can be used to generate optimal code sequences for machine architectures via a technique known as superoptimisation. Answer set programming (ASP) is utilised as the modelling and computational framework for searching over the large, complex search spaces and for proving the functional equivalence of two code sequences. Experimental results are given showing the progress made in solver performance over the previous few years, along with an outline of future developments to the system and applications within compiler toolchains.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A., Lam, M., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools, 2nd edn. Addison Wesley, Reading (2006)zbMATHGoogle Scholar
  2. 2.
    Bansal, S., Aiken, A.: Automatic Generation of Peephole Superoptimizers. In: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XII), pp. 394–403. ACM Press, New York (2006)CrossRefGoogle Scholar
  3. 3.
    Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge (2003)CrossRefzbMATHGoogle Scholar
  4. 4.
    Brain, M., Crick, T., De Vos, M., Fitch, J.: TOAST: Applying Answer Set Programming to Superoptimisation. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 270–284. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  5. 5.
    Granlund, T., Kenner, R.: Eliminating Branches using a Superoptimizer and the GNU C Compiler. In: Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation (PLDI 1992), pp. 341–352. ACM Press, New York (1992)CrossRefGoogle Scholar
  6. 6.
    Hall, M., Padua, D., Pingali, K.: Compiler Research: the Next 50 Years. Communications of the ACM 52(2), 60–67 (2009)CrossRefGoogle Scholar
  7. 7.
    Joshi, R., Nelson, G., Randall, K.: Denali: A Goal-Directed Superoptimizer. In: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation (PLDI 2002), pp. 304–314. ACM Press, New York (2002)CrossRefGoogle Scholar
  8. 8.
    Massalin, H.: Superoptimizer: A Look at the Smallest Program. In: Proceedings of the 2nd International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS II), pp. 122–126. IEEE Computer Society Press, Los Alamitos (1987)Google Scholar
  9. 9.
    SPARC International, Inc. The SPARC Architecture Manual, Version 8, Revision SAV080SI9308 (1992)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Tom Crick
    • 1
  • Martin Brain
    • 1
  • Marina De Vos
    • 1
  • John Fitch
    • 1
  1. 1.Department of Computer ScienceUniversity of BathBathUK

Personalised recommendations