Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1512762.1512770acmconferencesArticle/Chapter ViewAbstractPublication PageslcsdConference Proceedingsconference-collections
research-article

C++ concepts as institutions: a specification view on concepts

Published: 21 October 2007 Publication History
  • Get Citation Alerts
  • Abstract

    With the recent developments in the C++ language, concepts are mostly discussed as a form of constrained polymorphism. Yet, concepts also allow for an alternative, implementation-independent view that comes from their origin in (algebraic) specification languages. In this paper, we return to this specification view on concepts and formalize C++ concepts as institutions, a well-established notion for precise specifications of software components. We argue that institutions form a suitable theoretical framework for software systems like libraries where the different parts establish relations that are captured by different logics, or no formal logic at all. Assuming the C++ concept descriptions, concept maps, and axioms as in the draft currently accepted by the C++ standardization committee, we show that concept descriptions and axioms form an institution (with equational logic) but also, and perhaps surprisingly, that concept descriptions and concept maps form an institution (with no formal logic).

    References

    [1]
    D. Aspinall and D. Sannella. From specifications to code in Casl. In Proc. 9th Int. Conf. on Algebraic Methodology and Software Technology, volume 2422 of LNCS, pages 11--40. Springer, Sept. 2002.
    [2]
    M. Bidoit and P. D. Mosses. Casl User Manual. LNCS Vol. 2900 (IFIP Series). Springer, 2004. With chapters by Till Mossakowski, Donald Sannella, and Andrzej Tarlecki.
    [3]
    CoFI (The Common Framework Initiative). Casl Reference Manual. LNCS Vol. 2960 (IFIP Series). Springer, 2004.
    [4]
    G. Dos Reis and B. Stroustrup. Specifying C++ concepts. In Proc. 33rd ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages (POPL), pages 295--308, New York, NY, USA, 2006. ACM Press.
    [5]
    J.-Y. Girard. Interprétation fonctionnelle et élimination des coupures de l'arithmétique d'ordre supérieur. PhD thesis, Universite Paris VII, France, 1972.
    [6]
    J. Goguen. Principles of parameterized programming. In Software Reusability, volume 1, pages 159--225. Addison-Wesley, 1989.
    [7]
    J. Goguen. Hyperprogramming: A formal approach to software environments. In Proc. Symposium on Formal Methods in Software Development, Tokyo, Japan, Jan. 1990.
    [8]
    J. Goguen and R. Burstall. Institutions: abstract model theory for specification and programming. J. ACM, 39(1):95--146, 1992.
    [9]
    J. Goguen and K. Levitt, editors. Report on Program Libraries Workshop, Menlo Park, CA, USA, 1983. SRI International.
    [10]
    J. Goguen and G. Roşu. Institution morphisms. Formal Aspects of Computing, 13(3--5):274--307, 2002.
    [11]
    J. Goguen and W. Tracz. An implementation-oriented semantics for module composition. In G. Leavens and M. Sitaraman, editors, Foundations of Component-Based Systems, pages 231--263. Cambridge, Apr. 2000.
    [12]
    R. Goldblatt. Topoi, The Categorial Analysis of Logic. North-Holland, revised edition edition, 1984.
    [13]
    P. Gottschling. Fundamental algebraic concepts in concept-enabled C++. Technical Report 638, Indiana University, 2006.
    [14]
    J. Gougen. Reusing and interconnecting software components. Computer, 19(2):16--28, Feb. 1986.
    [15]
    D. Gregor. ConceptGCC: Concept extensions for C++. http://www.generic-programming.org/software/ConceptGCC/.
    [16]
    D. Gregor. High-Level Static Analysis for Generic Libraries. PhD thesis, Rensselaer Polytechnic Institute, May 2004.
    [17]
    D. Gregor, J. Järvi, J. Siek, B. Stroustrup, G. Dos Reis, and A. Lumsdaine. Concepts: Linguistic support for generic programming in C++. In Proc. ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 291--310, Oct. 2006.
    [18]
    D. Gregor and A. Lumsdaine. Concepts for the C++ Standard Library: Utilities (revision 2). Technical Report N2322=07-0182, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, July 2007.
    [19]
    D. Gregor and B. Stroustrup. Proposed wording for concepts (revision 1). Technical Report N2307=07-0167, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, July 2007.
    [20]
    M. Haveraaen. Institutions, Property-Aware Programming and Testing. Library Centric Software Design Workshop, Oct. 2007. Accepted for publication.
    [21]
    J. Järvi, D. Gregor, J. Willcock, A. Lumsdaine, and J. Siek. Algorithm specialization in generic programming: challenges of constrained generics in C++. In Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 272--282. ACM Press, 2006.
    [22]
    S. P. Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.
    [23]
    D. Kapur and D. Musser. Tecton: a framework for specifying and verifying generic system components. Technical Report RPI-92-20, Department of Computer Science, Rensselaer Polytechnic Institute, 1992.
    [24]
    D. Kapur, D. Musser, and A. Stepanov. Operators and algebraic structures. In Proc. Conference on Functional Programming Languages and Computer Architecture. ACM Press, 1981.
    [25]
    D. Kapur, D. Musser, and A. Stepanov. Tecton: A language for manipulating generic objects. In J. Staunstrup, editor, Proc. Workshop on Program Specification, volume 134 of LNCS, pages 414--402. Springer, Aug. 1981.
    [26]
    F. Lawvere. The category of categories as a foundation for mathematics. In Proc. Conference on Categorical Algebra, pages 1--20. Springer, 1966.
    [27]
    R. Milner, M. Tofte, and R. Harper. The Definition of Standard ML. MIT Press, 1990.
    [28]
    T. Mossakowski, C. Maeder, and K. Lüttich. The Heterogeneous Tool Set. In O. Grumberg and M. Huth, editors, TACAS 2007, volume 4424 of Lecture Notes in Computer Science, pages 519--522. Springer-Verlag Heidelberg, 2007.
    [29]
    D. Musser, S. Schupp, and R. Loos. Requirements-oriented programming. In M. Jazayeri, R. Loos, and D. Musser, editors, Generic Programming: International Seminar, Dagstuhl Castle, Germany, 1998, Selected Papers, volume 1766 of Lecture Notes in Computer Science. Springer, 2000.
    [30]
    D. Musser and A. Stepanov. Generic programming. In Proc. Int. Symopsium on Symbolic and Algebraic Computation, volume 358 of LNCS, pages 13--25, 1998.
    [31]
    D. Musser and C. Wang. A basis for formal specification and verification of generic algorithms in the C++ standard template library. Technical Report 95-1, Dept. of Computer Science, Rensselaer Polytechnic Inst., Jan. 1995.
    [32]
    R. Prieto-Diaz and J. Neighbors. Module interconnect language. Journal of Systems and Software, 6(4):307--344, Nov. 1986.
    [33]
    D. Sannella and A. Tarlecki. Specifications in an arbitrary institution. Inf. Comput., 76(2--3):165--210, 1988.
    [34]
    L. Schröder and T. Mossakowski. HasCASL: towards integrated specification and development of functional programs. In H. Kirchner and C. Ringeissen, editors, Algebraic Methodology And Software Technology (AMAST 2002), volume 2422 of LNCS, pages 99--116. Springer, 2002.
    [35]
    S. Schupp, D. Gregor, and D. Musser. Algebraic concepts represented in C++. Technical Report TR-00-8, Rensselaer Polytechnic Institute, 2000.
    [36]
    J. Siek, L.-Q. Lee, and A. Lumsdaine. The Boost Graph Library: User Guide and Reference Manual. Addison-Wesley, 2002.
    [37]
    J. Siek and A. Lumsdaine. Essential language support for generic programming. In Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 73--84. ACM Press, 2005.
    [38]
    A. Stepanov and M. Lee. The Standard Template Library. Technical Report HPL-94-34(R.1), Hewlett-Packard Laboratories, 1994.
    [39]
    A. Tarlecki. Institutions: an abstract framework for formal specifications. In E. Astesiano, H.-J. Kreowski, and B. Krieg-Bruckner, editors, Algebraic Foundations of System Specification, pages 105--130. Springer, 1999.
    [40]
    A. Tarlecki. Abstract specification theory: an overview. In M. Broy and M. Pizka, editors, Models, Algebras, and Logics of Engineering Software, volume 191 of NATO Science Series---Computer and Systems Sciences, pages 43--79. IOS Press, 2003.
    [41]
    US Department of Defense, US Government Printing Office. The Ada Programming Language Reference Manual, 1983. ANSI/MIL-STD-1815A-1983 Document.
    [42]
    P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In Proc. 16th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages (POPL), pages 60--76, New York, NY, USA, 1989. ACM Press.
    [43]
    C. Wang and D. R. Musser. Dynamic verification of C++ generic algorithms. IEEE Trans. Softw. Eng., 23(5):314--323, 1997.
    [44]
    J. Willcock, J. Järvi, A. Lumsdaine, and D. Musser. A formalization of concepts for generic programming. In Concepts: a Linguistic Foundation of Generic Programming at Adobe Tech Summit. Adobe Systems, Apr. 2004.
    [45]
    M. Wirsing. Algebraic specification. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, chapter 13, pages 677--788. Elsevier, 1990.
    [46]
    M. Zalewski and S. Schupp. Change impact analysis for generic libraries. In Proc. 22nd IEEE International Conference on Software Maintenance (ICSM), pages 35--44, Los Alamitos, CA, USA, 2006. IEEE Computer Society.

    Cited By

    View all
    • (2014)Scoping rules on a platterProceedings of the 10th ACM SIGPLAN workshop on Generic programming10.1145/2633628.2633633(59-70)Online publication date: 26-Aug-2014
    • (2009)Concepts as Syntactic SugarProceedings of the 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation10.1109/SCAM.2009.26(147-156)Online publication date: 20-Sep-2009
    1. C++ concepts as institutions: a specification view on concepts

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      LCSD '07: Proceedings of the 2007 Symposium on Library-Centric Software Design
      October 2007
      125 pages
      ISBN:9781605580869
      DOI:10.1145/1512762
      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

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 21 October 2007

      Permissions

      Request permissions for this article.

      Check for updates

      Qualifiers

      • Research-article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)2
      • Downloads (Last 6 weeks)0

      Other Metrics

      Citations

      Cited By

      View all
      • (2014)Scoping rules on a platterProceedings of the 10th ACM SIGPLAN workshop on Generic programming10.1145/2633628.2633633(59-70)Online publication date: 26-Aug-2014
      • (2009)Concepts as Syntactic SugarProceedings of the 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation10.1109/SCAM.2009.26(147-156)Online publication date: 20-Sep-2009

      View Options

      Get Access

      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