Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1133981.1134003acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Context-sensitive domain-independent algorithm composition and selection

Published: 11 June 2006 Publication History

Abstract

Progressing beyond the productivity of present-day languages appears to require using domain-specific knowledge. Domain-specific languages and libraries (DSLs) proliferate, but most optimizations and language features have limited portability because each language's semantics are related closely to its domain. We explain how any DSL compiler can use a domain-independent AI planner to implement algorithm composition as a language feature. Our notion of composition addresses a common DSL problem: good library designers tend to minimize redundancy by including only fundamental procedures that users must chain together into call sequences. Novice users are confounded by not knowing an appropriate sequence to achieve their goal. Composition allows the programmer to define and call an abstract algorithm (AA) like a procedure. The compiler replaces an AA call with a sequence of library calls, while considering the calling context. Because AI planners compute a sequence of operations to reach a goal state, the compiler can implement composition by analyzing the calling context to provide the planner's initial state. Nevertheless, mapping composition onto planning is not straightforward because applying planning to software requires extensions to classical planning, and procedure specifications may be incomplete when expressed in a planning language. Compositions may not be provably correct, so our approach mitigates semantic incompleteness with unobtrusive programmer-compiler interaction. This tradeoff is key to making composition a practical and natural feature of otherwise imperative languages, whose users eschew complex logical specifications. Compositions satisfying an AA may not be equal in performance, memory usage, or precision and require selection of a preferred solution. We examine language design and implementation issues, and we perform a case study on the BioPerl bioinformatics library.

References

[1]
T. Ball et al. Automatic Predicate Abstraction of C Programs. In Proceedings of the Conference on Programming Language Design and Implementation, June 2001.
[2]
R. Balzer. A 15-year Perspective on Automatic Programming. IEEE Transactions on Software Engineering, 11(11):1257--1268, November 1985.
[3]
D. R. Barstow. Domain-Specific Automatic Programming. IEEE Transactions on Software Engineering, 11(11):1321--1336, November 1985.
[4]
D. Batory. The Road to Utopia: A Future for Generative Programming. In C. Lengauer et al., editors, Domain-Specific Program Generation (Dagstuhl), pages 1--18, 2004.
[5]
A. W. Biermann. Approaches to Automatic Programming. Advances in Computers, 15:1--63, 1976.
[6]
J. Blythe et al. The Role of Planning in Grid Computing. In Proceedings of the International Conference on Automated Planning and Scheduling, June 2003.
[7]
A. Borgida, J. Mylopoulos, and R. Reiter. On the Frame Problem in Procedure Specifications. IEEE Transactions on Software Engineering, 21(10):785--798, October 1995.
[8]
L. C. Briand, T. Langley, and I.Wieczorek. A Replicated Assessment and Comparison of Common Software Cost Modeling Techniques. In Proceedings of the International Conference on Software Engineering, pages 377--386, 2000.
[9]
J. R. Buchanan and D. C. Luckham. On Automating the Construction of Programs. Technical report, Stanford Artificial Intelligence Project, 1974.
[10]
R. Cytron et al. Efficiently Computing Static Single Assignment Form and the Program Dependence Graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, October 1991.
[11]
R. E. Fikes and N. J. Nilsson. STRIPS: A New Approach to the Application of Theorem Proving to Problem Solving. Artificial Intelligence, 2(3-4):189--208, 1971.
[12]
C. Flanagan and S. Qadeer. Predicate Abstraction for Software Verification. In Proceedings of the ACM Symposium on Principles of Programming Languages, January 2002.
[13]
M. Ghallab et al. PDDL - the Planning Domain Definition Language, Version 1.2. Technical Report DCS TR-1165, Yale Center for Computational Vision and Control, 1998.
[14]
M. Ghallab, D. Nau, and P. Traverso. Automated Planning Theory and Practice. Morgan Kaufmann Publishers, 2004.
[15]
R. Givan. Inferring Program Specifications in Polynomial-Time. In Proceedings of the Static Analysis Symposium, 1996.
[16]
K. Golden. A Domain Description Language for Data Processing. In Proceedings of the International Conference on Automated Planning and Scheduling, Workshop on the Future of PDDL, 2003.
[17]
A. Gomez-Perez, O. Corcho, and M. Fernandez-Lopez. Ontological Engineering: with Examples from the Areas of Knowledge Management, e-Commerce and the Semantic Web. Springer, 2004.
[18]
M. Gribskov. President, International Society for Computational Biology; Professor of Biological Sciences and Computer Science, Purdue University. Personal communication, September 2005.
[19]
J. V. Guttag and J. Homing. Larch: Languages and Tools for Formal Specification. Texts and Monographs in Computer Science, 1993.
[20]
S. Z. Guyer and C. Lin. Broadway: A Compiler for Exploiting the Domain-Specific Semantics of Software Libraries. Proceedings of the IEEE, 93(2):342--357, February 2005
[21]
J. E. Hopcroft and J. D. Ullman. Formal Languages and Their Relation to Automata. Addison-Wesley, 1969.
[22]
E. N. Houstis et al. PYTHIA-II: a Knowledge/Database System for Managing Performance Data and Recommending Scientific Software. ACM Transactions on Mathematical Software, 26(2):227--253, 2000.
[23]
N. Jefferson and S. Riddle. Towards a Formal Semantics of a Composition Language. In Proceedings of the Workshop on Composition Languages at ECOOP, 2003.
[24]
K. Kennedy et al. Telescoping Languages: A System for Automatic Generation of Domain Languages. Proceedings of the IEEE, 93(3):387--408, 2005.
[25]
K. Kennedy, C. Koelbel, and R. Schreiber. Defining and Measuring the Productivity of Programming Languages. International Journal of High Performance Computing Applications, 18(4):441--448, 2004.
[26]
J. Kim, M. Sparagen, and Y. Gil. An Intelligent Assistant for Interactive Workflow Composition. In Proceedings of the International Conference on Intelligent User Interfaces, pages 125--131, 2004.
[27]
C.W. Krueger. Software Reuse. ACMComputing Surveys, 24(2):131--183, June 1992.
[28]
S. Lerner, T. Millstein, and C. Chambers. Automatically Proving the Correctness of Compiler Optimizations. In Proceedings of the Conference on Programming Language Design and Implementation, June 2003.
[29]
D. Mandelin et al. Jungloid Mining: Helping to Navigate the API Jungle. In Proceedings of the Conference on Programming Language Design and Implementation, June 2005.
[30]
Z. Manna and R. Waldinger. Fundamentals of Deductive Program Synthesis. IEEE Transactions on Software Engineering, 18(8):674--704, August 1992.
[31]
B. D. Martino, G. Iannello, and H. P. Zima. An Automated Algorithmic Recognition Technique to Support Parallel Software Development. In Proceedings of the International Workshop on Parallel and Distributed Software Engineering, May 1997.
[32]
V. Menon and K. Pingali. A Case for Source-Level Transformations in MATLAB. In Proceedings of the 2nd USENIX Conference on Domain-Specific Languages, pages 53--65, October 1999.
[33]
V. Menon and K. Pingali. High-Level Semantic Optimization of Numerical Codes. In International Conference on Supercomputing, pages 434--443, June 1999.
[34]
R. Metzger and Z. Wen. Automatic Algorithm Recognition and Replacement. MIT Press, 2000.
[35]
D. S. Nau, Y. Cao, A. Lotem, and H. Muñoz-Avila. The SHOP planning system. AI Magazine, Fall 2001.
[36]
G. C. Necula. Translation Validation for an Optimizing Compiler. In Proceedings of the Conference on Programming Language Design and Implementation, June 2000.
[37]
E. P. D. Pednault. ADL and the State-Transition Model of Action. Journal of Logic and Computation, 4(5):467--512, 1994.
[38]
E. S. Raymond. The Art of Unix Programming, chapter 8: Minilanguages. Addison-Wesley, 2004.
[39]
J. R. Rice. The Algorithm Selection Problem. Advances in Computers, 15:65--118, 1976.
[40]
C. Rich and R. C. Waters. Automatic Programming: Myths and Prospects. IEEE Computer, 21(8):40--51, August 1988.
[41]
P. Schnorf, M. Ganapathi, and J. L. Hennessy. Compile-Time Copy Elimination. Software Practice and Experience, 23(11):1175--1200, November 1993.
[42]
U. P. Schultz, J. L. Lawall, and C. Consel. Automatic Program Specialization for Java. ACM Transactions on Programming Languages and Systems, 25(4):452--499, 2003.
[43]
J. M. Siskind and D. A. McAllester. Screamer: A Portable Efficient Implementation of Nondeterministic Common Lisp. Technical Report IRCS-93-03, Institute for Research in Cognitive Science, University of Pennsylvania, 1993.
[44]
J. E. Stajich et al. The Bioperl Toolkit: Perl Modules for the Life Sciences. Genome Research, 12(10):1611--1618, October 2002.
[45]
M. Stickel et al. Deductive Composition of Astronomical Software from Subroutine Libraries. In Proceedings of the International Conference on Automated Deduction, pages 341--355, June 1994.
[46]
N. Thomas et al. A Framework for Adaptive Algorithm Selection in STAPL. In Proceedings of the Symposium on the Principles and Practice of Parallel Programming, June 2005.
[47]
M. T. Vandevoorde. Exploiting Specifications to Improve Program Performance. PhD thesis, MIT, 1994.
[48]
S.Weerawarana et al. PYTHIA: a Knowledge-Based System to Select Scientific Algorithms. ACM Transactions on Mathematical Software, 22(4):447--468, 1996.
[49]
D. S. Weld. Recent Advances in AI Planning. AI Magazine, pages 93--123, Summer 1999.
[50]
S. Woods and Q. Yang. The Program Understanding Problem: Analysis and a Heuristic Approach. In Proceedings of the InternationalConference on Software Engineering, pages 6--15, 1996.
[51]
H. Yu, D. Zhang, and L. Rauchwerger. An Adaptive Algorithm Selection Framework. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques (PACT), September 2004.
[52]
A. M. Zaremski and J. M. Wing. Specification Matching of Software Components. ACM Transactions on Software Engineering and Methodology, 6(4):333--369, October 1997.

Cited By

View all
  • (2017)Component-based synthesis of table consolidation and transformation tasks from examplesACM SIGPLAN Notices10.1145/3140587.306235152:6(422-436)Online publication date: 14-Jun-2017
  • (2017)Component-based synthesis of table consolidation and transformation tasks from examplesProceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3062341.3062351(422-436)Online publication date: 14-Jun-2017
  • (2015)Synthesizing parallel graph programs via automated planningACM SIGPLAN Notices10.1145/2813885.273795350:6(533-544)Online publication date: 3-Jun-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '06: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2006
438 pages
ISBN:1595933204
DOI:10.1145/1133981
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 6
    Proceedings of the 2006 PLDI Conference
    June 2006
    426 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1133255
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. algorithm composition
  2. algorithm selection
  3. automated planning
  4. bioinformatics
  5. domain-specific languages

Qualifiers

  • Article

Conference

PLDI06
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2017)Component-based synthesis of table consolidation and transformation tasks from examplesACM SIGPLAN Notices10.1145/3140587.306235152:6(422-436)Online publication date: 14-Jun-2017
  • (2017)Component-based synthesis of table consolidation and transformation tasks from examplesProceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3062341.3062351(422-436)Online publication date: 14-Jun-2017
  • (2015)Synthesizing parallel graph programs via automated planningACM SIGPLAN Notices10.1145/2813885.273795350:6(533-544)Online publication date: 3-Jun-2015
  • (2015)Synthesizing parallel graph programs via automated planningProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2737924.2737953(533-544)Online publication date: 3-Jun-2015
  • (2014)MUX: algorithm selection for software model checkersProceedings of the 11th Working Conference on Mining Software Repositories10.1145/2597073.2597080(132-141)Online publication date: 31-May-2014
  • (2011)Synthesis of loop-free programsProceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1993498.1993506(62-73)Online publication date: 4-Jun-2011
  • (2011)Synthesis of loop-free programsACM SIGPLAN Notices10.1145/1993316.199350646:6(62-73)Online publication date: 4-Jun-2011
  • (2010)Oracle-guided component-based program synthesisProceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 110.1145/1806799.1806833(215-224)Online publication date: 1-May-2010
  • (2009)Construction of messaging-based enterprise integration solutions using AI planningProceedings of the 4th IFIP TC 2 Central and East European conference on Advances in Software Engineering Techniques10.1007/978-3-642-28038-2_2(16-29)Online publication date: 12-Oct-2009
  • (2018)Modular implementation of dynamic algorithm switching in parallel simulationsCluster Computing10.1007/s10586-012-0205-z15:3(321-332)Online publication date: 24-Dec-2018
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media