DocumentCode
3450386
Title
Applying the decorator pattern for profiling object-oriented software
Author
Duffy, Edward B. ; Gibson, J. Paul ; Malloy, Brian A.
Author_Institution
Dept. of Comput. Sci., Clemson Univ., SC, USA
fYear
2003
fDate
10-11 May 2003
Firstpage
84
Lastpage
93
Abstract
A profiler can provide valuable information to a developer to facilitate program optimization, debugging or testing. In this paper, we describe the use of the decorator pattern for non-intrusive profiling of object-oriented applications. We provide a formal specification of the decorator pattern, and show that the pattern can be used as a program transformation without altering the external, observable behavior of the system. We refer to such a transformation as a correctness preserving transformation, or CPT. As a CPT, the decorator pattern can be used to non-intrusively profile object-oriented applications and we illustrate this application with an invariant validator for enforcement of design by contract, and for profiling memory. We provide a case study to compare the cost trade-offs of validating invariants at different points in a program.
Keywords
formal specification; object-oriented programming; program debugging; program testing; reverse engineering; correctness preserving transformation; decorator pattern; formal specification; object-oriented software profiling; program debugging; program optimization; program testing; program transformation; Computer science; Contracts; Costs; Counting circuits; Debugging; Formal specifications; Frequency; Instruments; Runtime; Testing;
fLanguage
English
Publisher
ieee
Conference_Titel
Program Comprehension, 2003. 11th IEEE International Workshop on
ISSN
1092-8138
Print_ISBN
0-7695-1883-4
Type
conf
DOI
10.1109/WPC.2003.1199192
Filename
1199192
Link To Document