Skip to main content

Generating Optimal Code Using Answer Set Programming

  • Conference paper
Book cover Logic Programming and Nonmonotonic Reasoning (LPNMR 2009)

Part of the book series: Lecture Notes in Computer Science ((LNAI,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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A., Lam, M., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools, 2nd edn. Addison Wesley, Reading (2006)

    MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  3. Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge (2003)

    Book  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  6. Hall, M., Padua, D., Pingali, K.: Compiler Research: the Next 50 Years. Communications of the ACM 52(2), 60–67 (2009)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. SPARC International, Inc. The SPARC Architecture Manual, Version 8, Revision SAV080SI9308 (1992)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Crick, T., Brain, M., De Vos, M., Fitch, J. (2009). Generating Optimal Code Using Answer Set Programming. In: Erdem, E., Lin, F., Schaub, T. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2009. Lecture Notes in Computer Science(), vol 5753. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04238-6_57

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-04238-6_57

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-04237-9

  • Online ISBN: 978-3-642-04238-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics