skip to main content
research-article

Synthesis of fast programs for maximum segment sum problems

Published:04 October 2009Publication History
Skip Abstract Section

Abstract

It is well-known that a naive algorithm can often be turned into an efficient program by applying appropriate semantics-preserving transformations. This technique has been used to derive programs to solve a variety of maximum-sum programs. One problem with this approach is that each problem variation requires a new set of transformations to be derived. An alternative approach to generation combines problem specifications with flexible algorithm theories to derive efficient algorithms. We show how this approach can be implemented in Haskell and applied to solve constraint satisfaction problems. We illustrate this technique by deriving programs for three varieties of maximum-weightsum problem. The derivations of the different programs are similar, and the resulting programs are asymptotically faster in practice than the programs created by transformation.

References

  1. R. S. Bird. Algebraic identities for program calculation. Comput. J., 32(2):122--126, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. S. Bird and O. De Moor. Algebra of programming. Prentice-Hall, Inc., NJ, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K.R. Baker and Z-S. Su. Sequencing with due-dates and early start times to minimize maximum tardiness. Naval Research Logistics, 21(1):171--176, 1974.Google ScholarGoogle ScholarCross RefCross Ref
  4. R Dechter. Constraint Processing. Morgan Kauffman, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Ibaraki. The power of dominance relations in branch-and-bound algorithms. J. ACM, 24(2):264--279, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. J. T. Jeuring and T. O. Pekela. Theories for algorithm calculation. Technical report, 1993.Google ScholarGoogle Scholar
  7. Shin-Cheng Mu. Maximum segment sum is back: deriving algorithms for two segment problems with bounded lengths. In PEPM '08, pages 31--39. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Nedunuri, W. R. Cook, and D. R. Smith. Synthesis of greedy algorithms from dominance relations. Submitted To: Intl. Conf. on Formal Engg Methods (ICFEM), 2009.Google ScholarGoogle Scholar
  9. S. Nedunuri, D. R. Smith, and W. R. Cook. Tactical synthesis of efficient global search algorithms. In Proc. NASA Symposium on Formal Methods, April 2009.Google ScholarGoogle Scholar
  10. R. Paige and S. Koenig. Finite differencing of computable expressions. ACM TOPLAS, 4(3):402--454, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Specware. http://www.specware.org.Google ScholarGoogle Scholar
  12. Isao Sasano, Zhenjiang Hu, and Masato Takeichi. Make it practical: A generic linear-time algorithm for solving maximum-weightsum problems. In Proc. Intl. Conf. on Functional Prog.(ICFP), 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Isao Sasano, Zhenjiang Hu, and Masato Takeichi. Generation of efficient programs for solving maximum multi-marking problems. In Proc. 2nd Intl. SAIG Workshop, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Douglas R. Smith. Applications of a strategy for designing divide-and-conquer algorithms. Sci. Comput. Program., 8(3):213--229, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. R. Smith. Structure and design of global search algorithms. Tech. Rep. Kes.U.87.12, Kestrel Institute, 1988.Google ScholarGoogle Scholar
  16. D. R. Smith. Kids: A semi-automatic program development system. IEEE Trans. on Soft. Eng., Spec. Issue on Formal Methods, 16(9):1024--1043, September 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Isao Sasano, Mizuhito Ogawa, and Zhenjiang Hu. Maximum marking problems with accumulative weight functions. In Proc. ICTAC. Springer-Verlag, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. R. Smith, E. A. Parra, and S. J. Westfold. Synthesis of high-performance transportation schedulers. Technical report, Kestrel Institute, 1995.Google ScholarGoogle Scholar

Index Terms

  1. Synthesis of fast programs for maximum segment sum problems

    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

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 45, Issue 2
      GPCE '09
      February 2010
      182 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1837852
      Issue’s Table of Contents
      • cover image ACM Conferences
        GPCE '09: Proceedings of the eighth international conference on Generative programming and component engineering
        October 2009
        194 pages
        ISBN:9781605584942
        DOI:10.1145/1621607
        • General Chair:
        • Jeremy Siek,
        • Program Chair:
        • Bernd Fischer

      Copyright © 2009 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 4 October 2009

      Check for updates

      Qualifiers

      • research-article

    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!