Towards a graphical notation to express the C++ template instantiation process (poster session)

  • Authors:
  • Arturo J. Sánchez;Jia Dei-Wei

  • Affiliations:
  • CIS Dept, University of North Florida, 4567 St. Johns Bluff Road, South Jacksonville, FL;CIS Department, UMass-Dartmouth, 285 Old Westport Road, North Dartmouth, MA

  • Venue:
  • OOPSLA '00 Addendum to the 2000 proceedings of the conference on Object-oriented programming, systems, languages, and applications (Addendum)
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

C++ programmers who make intensive use of templates for developing applications get poor support from the compilers they use. Typical error reporting associated with template analysis ranges from long, nested, and therefore complex expressions, to short but cryptic messages. This poster introduces a graphical notation that can be used as an intermediate abstract medium on which the result of template analysis can be expressed. The motivation of our approach is to make template analysis and error reporting two orthogonal activities. If compiler implementors adopt a standard notation to express the result of template analysis, tools to help programmers visualize/understand errors can be independently developed, and used as compiler “plug-ins”, which will hopefully have a positive impact on issues such as programmer's productivity and product quality. We have used this notation to manually parse examples taken from the STL, and less known powerful uses of templates, such as expression templates, and template meta-programming. The preliminary stage we are reporting on has helped us to (a) identify elements that are needed in the notation, (b) identify limitations that are due to the instantiation model inherently associated with the language, and (d) have a sense of how useful the notation can be to pinpoint errors associated with the analysis of non-trivial cases such as expression templates.