skip to main content
10.1145/1640089.1640120acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Optimizing programs with intended semantics

Published:25 October 2009Publication History

ABSTRACT

Modern object-oriented languages have complex features that cause programmers to overspecify their programs. This overspecification hinders automatic optimizers, since they must preserve the overspecified semantics. If an optimizer knew which semantics the programmer intended, it could do a better job.

Making a programmer clarify his intentions by placing assumptions into the program is rarely practical. This is because the programmer does not know which parts of the programs' overspecified semantics hinder the optimizer. Therefore, the programmer has to guess which assumption to add. Since the programmer can add many different assumptions to a large program, he will need to place many such assumptions before he guesses right and helps the optimizer.

We present IOpt, a practical optimizer that uses a specification of the programmers' intended semantics to enable additional optimizations. That way, our optimizer can significantly improve the performance of a program. We present case studies in which we use IOpt to speed up two programs by a factor of 2.

To make specifying the intended semantics practical, IOpt communicates with the programmer. IOpt identifies which assumptions the programmer should place, and where he should place them. IOpt ranks each assumption by (i) the likelyhood that the assumption conforms to the programmers' intended semantics and (ii) how much the assumption will help IOpt improve the programs' performance. IOpt proposes ranked assumptions to the programmer, who just picks those that conform to his intended semantics.With this approach, IOpt keeps the programmers' specification burden low. In our case studies, programmers had to add just a few assumptions to realize significant performance speedups.

References

  1. Keith D. Cooper, MaryW. Hall, Robert T. Hood, Ken Kennedy, Kathryn S. McKinley, John M. Mellor-Crummey, Linda Torczon, and Scott K.Warren. The ParaScope parallel programming environment. Proceedings of the IEEE, 81(2):244--263, 1993.Google ScholarGoogle ScholarCross RefCross Ref
  2. Christian Doerr, Douglas Sicker, and Dirk Grunwald. What a cognitive radio network can learn from a school of fish. Third Annual Wireless Internet Conference (WICON), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Joseph Hummel, Ana Azevedo, David Kolson, and Alexandru Nicolau. Annotating the Java bytecodes in support of optimization. Concurrency: Practice and Experience, 9(11):1003--1016, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  4. Shih-Wei Liao, Amer Diwan, Robert P. Bosch Jr., Anwar M. Ghuloum, and Monica S. Lam. SUIF explorer: An interactive and interprocedural parallelizer. In Principles Practice of Parallel Programming, pages 37--48, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. I. Pechtchanski and V. Sarkar. Immutability specification and its applications, 2002.Google ScholarGoogle Scholar
  6. Patrice Pominville, Feng Qian, Raja Vallee-Rai, Laurie Hendren, and Clark Verbrugge. A framework for optimizing Java using attributes. In R. Wilhelm, editor, CC 2001, volume 2027 of Lecture Notes in Computer Science, pages 334+, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Standard performance evaluation corporation. SPECjbb2000 (Java Business Benchmark). http://www.spec.org/jbb2000.Google ScholarGoogle Scholar
  8. Standard performance evaluation corporation. SPECjvm98 benchmarks. http://www.spec.org/jvm98.Google ScholarGoogle Scholar
  9. Daniel von Dincklage and Amer Diwan. Explaining failures of program analyses. In PLDI '08: Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation, pages 260--269, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Optimizing programs with intended semantics

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!