hh.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
A Semantic Analysis of C++ Templates
Rice University, Houston, TX 77005, United States.
Rice University, Houston, TX 77005, United States.ORCID iD: 0000-0003-3160-9188
2006 (English)In: ECOOP 2006 - Object-Oriented Programming: 20th European Conference, Nantes, France, July 3-7, 2006, Proceedings / [ed] Dave Thomas, Heidelberg: Springer, 2006, p. 304-327Conference paper, Published paper (Refereed)
Abstract [en]

Templates are a powerful but poorly understood feature ofthe C++ language. Their syntax resembles the parameterized classes ofother languages (e.g., of Java). But because C++ supports template specialization, their semantics is quite different from that of parameterizedclasses. Template specialization provides a Turing-complete sub-languagewithin C++ that executes at compile-time. Programmers put this powerto many uses. For example, templates are a popular tool for writingprogram generators.The C++ Standard defines the semantics of templates using natural language, so it is prone to misinterpretation. The meta-theoretic propertiesof C++ templates have not been studied, so the semantics of templateshas not been systematically checked for errors. In this paper we presentthe first formal account of C++ templates including some of the morecomplex aspects, such as template partial specialization. We validate oursemantics by proving type safety and verify the proof with the Isabelleproof assistant. Our formalization reveals two interesting issues in theC++ Standard: the first is a problem with member instantiation and thesecond concerns the generation of unnecessary template specializations.

Place, publisher, year, edition, pages
Heidelberg: Springer, 2006. p. 304-327
Series
Lecture Notes in Computer Science, ISSN 0302-9743 ; 4067
Keywords [en]
Codes (symbols), Error correction, High level languages, Natural language processing systems, Parameter estimation, Security of data, Semantics, Standards
National Category
Computer Systems
Identifiers
URN: urn:nbn:se:hh:diva-20971DOI: 10.1007/11785477_19ISI: 000239558900018Scopus ID: 2-s2.0-33746612005ISBN: 3-540-35726-2 ISBN: 978-3-540-35726-1 OAI: oai:DiVA.org:hh-20971DiVA, id: diva2:588267
Conference
20th European Conference on Object-Oriented Programming (ECOOP 2006), Nantes, FRANCE, APR 03-JUL 07, 2006
Available from: 2013-01-15 Created: 2013-01-14 Last updated: 2021-05-11Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full textScopus

Authority records

Taha, Walid

Search in DiVA

By author/editor
Taha, Walid
Computer Systems

Search outside of DiVA

GoogleGoogle Scholar

doi
isbn
urn-nbn

Altmetric score

doi
isbn
urn-nbn
Total: 221 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf