Premium
Debugging programs that use macro‐oriented data abstractions
Author(s) -
Katzenelson Jacob,
Strominger Avy
Publication year - 1987
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380170202
Subject(s) - debugger , computer science , programming language , debugging , macro , compiler , substitution (logic) , set (abstract data type) , variable (mathematics) , statement (logic) , syntax , data type , compile time , algorithmic program debugging , abstraction , artificial intelligence , mathematical analysis , mathematics , political science , law , philosophy , epistemology
Enhanced C (EC) is a set‐oriented, extensible, C‐like language. EC uses data abstractions to define new types. These data abstractions, called clusters, are macro‐like devices that perform substitution on the typed syntax tree. Debugging programs that use clusters raise problems that are not encountered in ordinary programming languages. At compile time there is a need to determine and report whether the macro expansion will result in a legal program before this expansion actually takes place. At run‐time the problems are how to account for replaced statements and how to handle variables whose types have been established by the clusters, variables that disappear, or variables whose names have been changed. This article presents these problems and their solutions as implemented by the EC compiler and the EC symbolic debugger. Similar debugging problems appear in other languages: The need to handle variables at run time is common to all languages that support data abstraction even if the abstractions are procedure oriented; also, a mild form of the problem of the replaced statement appears in inline procedure substitution of Ada. The solutions developed for the EC debugger apply to these cases as well.