ABSTRACT
Large scale software is composed of libraries produced by different entities. Non-intrusive and efficient mechanisms for adapting data structures from one library to conform to APIs of another are essential for the success of large software projects. Concepts and concept maps, planned features for the next version of C++, have been designed to support adaptation, promising generic, non-intrusive, efficient, and identity preserving adapters. This paper analyses the use of concept maps for library composition and adaptation, comparing and contrasting concept maps to other common adaptation mechanisms. We report on two cases of data structure adaptation between different libraries, indicating best practices and idioms along the way. First, we adapt GUI controls from several frameworks for use with a generic layout engine, extending the application of concepts to run-time polymorphism. Second, we develop a transparent adaptation layer between an image processing library and a graph algorithm library, enabling the efficient application of graph algorithms to the image processing domain.
References
- (GCC) 4.3.0 20070330 (experimental) (Indiana University Concept GCC alpha7 prerelease).Google Scholar
- Boost Smart Pointers Library. www.boost.org/libs/smart_ptr.Google Scholar
- Adobe Systems, Inc. Adobe Source Library, 2005. opensource.adobe.com.Google Scholar
- P. An, A. Jula, S. Rus, S. Saunders, T. Smith, G. Tanase, N. Thomas, N. Amato, and L. Rauchwerger. STAPL: An adaptive, generic parallel C++ library. In Languages and Compilers for Parallel Computing, volume 2624 of Lecture Notes in Computer Science, pages 193--208. Springer, Aug. 2001.Google Scholar
Digital Library
- M. H. Austern. Generic programming and the STL: Using and extending the C++ Standard Template Library. Professional Computing Series. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1998. Google Scholar
Digital Library
- G. Baumgartner, M. Jansche, and K. Läufer. Half & Half: Multiple Dispatch and Retroactive Abstraction for Java. Technical Report OSU-CISRC-5/01-TR08, Ohio State University, 2002.Google Scholar
- E. P. Becker. Working draft, standard for programming language C++. Technical Report N2009=06-0079, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, Apr. 2006.Google Scholar
- Boost. Boost C++ Libraries. http://www.boost.org/.Google Scholar
- L. Bourdev and H. Jin. Generic Image Library, 2006. opensource.adobe.com/gil.Google Scholar
- A. Breuer, P. Gottschling, D. Gregor, and A. Lumsdaine. Effecting parallel graph eigensolvers through library composition. In Performance Optimization for High-Level Languages and Libraries (POHLL), Apr. 2006.Google Scholar
Digital Library
- M. M. T. Chakravarty, G. Keller, and S. Peyton Jones. Associated type synonyms. In ICFP '05: Proceedings of the International Conference on Functional Programming, pages 241--253, New York, NY, USA, Sept. 2005. ACM Press. Google Scholar
Digital Library
- M. M. T. Chakravarty, G. Keller, S. Peyton Jones, and S. Marlow. Associated types with class. In POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 1--13, New York, NY, USA, 2005. ACM Press. Google Scholar
Digital Library
- A. Fabri, G.-J. Giezeman, L. Kettner, S. Schirra, and S. Schönherr. On the design of CGAL, a computational geometry algorithms library. Software - Practice and Experience, 30(11):1167--1202, 2000. Special Issue on Discrete Algorithm Engineering. Google Scholar
Digital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Publishing Co., New York, NY, USA, 1995. Google Scholar
Digital Library
- R. Garcia, J. Järvi, A. Lumsdaine, J. Siek, and J. Willcock. An extended comparative study of language support for generic programming. Journal of Functional Programming, 17:145--205, Mar. 2007. Google Scholar
Digital Library
- D. Gregor. ConceptGCC: Concept extensions for C++. http://www.generic-programming.org/software/ConceptGCC, 2005.Google Scholar
- D. Gregor, J. Järvi, J. Siek, B. Stroustrup, G. D. Reis, and A. Lumsdaine. Concepts: Linguistic support for generic programming in C++. In Proceedings of the 2006 ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '06), pages 291--310. ACM Press, Oct. 2006. Google Scholar
Digital Library
- D. Gregor and A. Lumsdaine. Lifting sequential graph algorithms for distributed-memory parallel computation. In Proceedings of the 2005 ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '05), pages 423--437, Oct. 2005. Google Scholar
Digital Library
- D. Gregor and B. Stroustrup. Proposed wording for concepts. Technical Report N2193=07-0053, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, Mar. 2007.Google Scholar
- IBM Research. Subject-oriented programming and the adapter pattern. www.research.ibm.com/sop/sopcadap.htm.Google Scholar
- International Organization for Standardization. ISO/IEC 14882:2003: Programming languages: C++. Geneva, Switzerland, 2nd edition, Oct. 2003.Google Scholar
- J. Järvi, J. Willcock, and A. Lumsdaine. Concept-controlled polymorphism. In F. Pfennig and Y. Smaragdakis, editors, Generative Programming and Component Engineering, volume 2830 of LNCS, pages 228--244. Springer Verlag, Sept. 2003. Google Scholar
Digital Library
- M. Jazayeri, R. Loos, D. Musser, and A. Stepanov. Generic Programming. In Report of the Dagstuhl Seminar on Generic Programming, Schloss Dagstuhl, Germany, Apr. 1998. Google Scholar
Digital Library
- M. P. Jones. Type classes with functional dependencies. In ESOP '00: Proceedings of the 9th European Symposium on Programming Languages and Systems, volume 1782 of Lecture Notes in Computer Science, pages 230--244, New York, NY, 2000. Springer-Verlag. Google Scholar
Digital Library
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In J. L. Knudsen, editor, ECOOP 2001 - Object-Oriented Programming 15th European Conference, volume 2072 of Lecture Notes in Computer Science, pages 327--353. Springer-Verlag, New York, NY, June 2001. Google Scholar
Digital Library
- R. Lämmel and K. Ostermann. Software extension and integration with type classes. In GPCE '06: Proceedings of the 5th international conference on Generative programming and component engineering, pages 161--170, New York, NY, USA, 2006. ACM Press. Google Scholar
Digital Library
- K. Läufer, G. Baumgartner, and V. F. Russo. Safe structural conformance for Java. The Computer Journal, 43(6):469--481, 2000.Google Scholar
Cross Ref
- V. Litvinov. Constraint-based polymorphism in Cecil: towards a practical and static type system. In OOPSLA '98: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 388--411, New York, NY, USA, 1998. ACM Press. Google Scholar
Digital Library
- B. Magnusson. Code reuse considered harmful Journal of Object-Oriented Programming, 4(3), Nov. 1991.Google Scholar
- M. Marcus, J. Järvi, and S. Parent. Runtime polymorphic generic programming - mixing objects and concepts in ConceptC++. In K. Davis and J. Striegnitz, editors, Multiparadigm Programming 2007: Proceedings of the MPOOL Workshop at ECOOP'07, July 2007. To appear.Google Scholar
- M. Mattsson, J. Bosch, and M. E. Fayad. Framework integration problems, causes, solutions. Commun. ACM, 42(10):80--87, 1999. Google Scholar
Digital Library
- B. McNamara and Y. Smaragdakis. Static interfaces in C++. In First Workshop on C++ Template Programming, Erfurt, Germany, Oct. 2000.Google Scholar
- K. Mehlhorn and S. Näher. The LEDA Platform of Combinatorial and Geometric Computing. Cambridge University Press, 1999. Google Scholar
Digital Library
- N. Mitchell, G. Sevitsky, and H. Srinivasan. The diary of a datum: An approach to modeling runtime complexity in framework-based applications. In Proceedings of the First International Workshop of Library-Centric Software Design (LCSD '05). An OOPSLA '05 workshop, Oct. 2005. As technical report 06-12 of Rensselaer Polytechnic Institute, Computer Science Department.Google Scholar
- N. C. Myers. Traits: a new and useful template technique. C++ Report, June 1995.Google Scholar
- M. Odersky. Poor man's type classes. Presentation at the meeting of IFIP WG 2.8, Functional Programming, July 2006. http://lamp.epfl.ch/~odersky/talks/wg2.8-boston06.pdf.Google Scholar
- M. Odersky. The Scala language specification: Version 2.0, draft march 17, 2006. http://scala.epfl.ch/docu/files/ScalaReference.pdf, 2006.Google Scholar
- S. Parent. Beyond objects: Understanding the software we write. Presentation at C++ Connections, opensource.adobe.com/wiki/index.php/Image:Regular_object_presentation.pdf, Nov. 2005.Google Scholar
- S. Parent. A possible future for software development. Keynote talk at the Workshop of Library-Centric Software Design 2006, at OOPSLA'06, Portland, Oregon, 2006. lcsd.cs.tamu.edu/2006.Google Scholar
- W. R. Pitt, M. A. Williams, M. Steven, B. Sweeney, A. J. Bleasby, and D. S. Moss. The Bioinformatics Template Library-generic components for biocomputing. Bioinformatics, 17(8):729--737, 2001.Google Scholar
Cross Ref
- J. Siek, L.-Q. Lee, and A. Lumsdaine. The Boost Graph Library: User Guide and Reference Manual. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2002. Google Scholar
Digital Library
- J. Siek and A. Lumsdaine. The Matrix Template Library: Generic components for high-performance scientific computing. Computing in Science and Engineering, 1(6):70--78, Nov/Dec 1999. Google Scholar
Digital Library
- J. Siek and A. Lumsdaine. Concept checking: Binding parametric polymorphism in C++. In First Workshop on C++ Template Programming, Oct. 2000.Google Scholar
- J. Siek, A. Lumsdaine, and L.-Q. Lee. Boost Graph Library. Boost, 2001. www.boost.org/libs/graph.Google Scholar
- Silicon Graphics, Inc. SGI Implementation of the Standard Template Library, 2004. http://www.sgi.com/tech/stl/.Google Scholar
- A. Stepanov and M. Lee. The Standard Template Library. Technical Report HPL-94-34(R.1), Hewlett-Packard Laboratories, Apr. 1994. http://www.hpl.hp.com/techreports.Google Scholar
- C. Szyperski. Component software: beyond object-oriented programming. ACM Press/Addison-Wesley Publishing Co., New York, NY, USA, 1998. Google Scholar
Digital Library
- M. Troyer and P. Dayal. The Iterative Eigensolver Template Library. http://www.comp-phys.org:16080/software/ietl/.Google Scholar
- P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad-hoc. In ACM Symposium on Principles of Programming Languages, pages 60--76. ACM, Jan. 1989. Google Scholar
Digital Library
Index Terms
Library composition and adaptation using c++ concepts





Comments