Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/586094.586107acmconferencesArticle/Chapter ViewAbstractPublication PagespasteConference Proceedingsconference-collections
Article

Using the observer design pattern for implementation of data flow analyses

Published: 18 November 2002 Publication History

Abstract

Data flow analysis is used widely in program compilation, understanding, design, and analysis tools. In data flow analysis, problem-specific information is associated with nodes and/or edges in the flow graph representation of a program or component and re-comp\-uted iteratively. A popular data flow analysis design relies on a worklist that stores all nodes and edges whose data flow information has to be re-computed. While this approach is straightforward, it has some drawbacks. First, the presence of the worklist makes data flow algorithms centralized, which may reduce effectiveness of parallel implementations of these algorithms. Second, the worklist approach is difficult to implement in a way that minimizes the amount of information passed between flow graph nodes.In this paper, we propose to use the well-known Observer pattern for implementation of data flow analyses. We argue that such implementations are more object-oriented in nature, as well as less centralized, than worklist-based ones. We argue that by adopting this Observer-based view, data flow analyses that minimize the amount of information passed between flow graph nodes can be implemented easier than by using the worklist view. We present experimental data indicating that for some types of data flow problems, even single-threaded implementations of Observer-based data flow analysis have better run times than comparable worklist-based implementations.

References

[1]
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, 1988.
[2]
G. R. Andrews. Concurrent Programming -- Principles and Practice. Benjamin/Cummins Publishing Company Ltd., 1991.
[3]
H. Y. Chen, T. H. Tse, and T. Y. Chen. Automatic analysis of consistency between requirements and designs. IEEE Transactions on Software Engineering, 27(7), July 2001.
[4]
J. M. Cobleigh, L. A. Clarke, and L. J. Osterweil. The right algorithm at the right time: Comparing data flow analysis algorithms for finite state verification. In Proceedings of the 23rd International Conference on Software Engeneering, pages 37--46, May 2001.
[5]
J. C. Corbett and G. S. Avrunin. Toward scalable compositional analysis. In Proceedings of the 2nd ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 53--61, Dec. 1994.
[6]
M. B. Dwyer and L. A. Clarke. Data flow analysis for verifying properties of concurrent programs. In Proceedings of the 2nd ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 62--75, Dec. 1994.
[7]
M. B. Dwyer and M. Martin. Practical parallelization : Experience with a complex flow analysis. Technical Report KSU CIS TR 99-4, Kansas State University, 1999.
[8]
Y. fong Lee, T. J. Marlowe, and B. G. Ryder. Experiences with a parallel algorithm for data flow analysis. The Journal of Supercomputing, 5(2-3):163--188, Oct. 1991.
[9]
R. Ford. Concurrent algorithms for real-time memory management. IEEE Software, pages 10--23, Sept. 1988.
[10]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns. Addison-Wesley Publishing Company, Inc., Reading, Massachusetts, 1994. ISBN 0-201-63361-2.
[11]
M. S. Hecht. Flow Analysis of Computer Programs. North-Holland, New York, 1977.
[12]
D. P. Helmbold and D. C. Luckham. Debugging Ada tasking programs. IEEE Software, 2(2):47--57, Mar. 1985.
[13]
M. Hind. Pointer analysis: Haven't we solved this problem yet? In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 54--61, June 2001.
[14]
S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages and Systems, 12(1):26--60, Jan. 1990.
[15]
R. K. Keller, M. Cameron, R. N. Taylor, and D. B. Troup. User interface development and software environments: The Chiron-1 system. In Proceedings of the 13th International Conference on Software Engineering, pages 208--218, Oct. 1991.
[16]
W. A. Landi and B. G. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In Proceedings of the ACM SIGPLAN Symposium on Programming Language Design and Implementation, pages 235--248, June 1992.
[17]
T. J. Marlowe and B. G. Ryder. Properties of data flow frameworks. Acta Informatica, 28(2):121--163, 1990.
[18]
S. P. Masticola, T. J. Marlowe, and B. G. Ryder. Lattice frameworks for multisource and bidirectional data flow problems. ACM Transactions of Programming Languages and Systems, 17(5):777--803, Sept. 1995.
[19]
S. P. Masticola and B. G. Ryder. A model of Ada programs for static deadlock detection in polynomial time. In Proceedings of the Workshop on Parallel and Distributed Debugging, pages 97--107, May 1991.
[20]
S. P. Masticola and B. G. Ryder. Non-concurrency analysis. In Proceedings of the 4th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 129--138, May 1993.
[21]
R. Milner. A Calculus of Communicating Systems, volume 92. Springer-Verlag, Berlin, 1980.
[22]
G. Naumovich. Using the observer design pattern for implementing data flow analyses. Technical Report TR-CIS-2002-01, Polytechnic University, Brooklyn, June 2002. http://cis.poly.edu/tr/tr-cis-2002-01.shtml.
[23]
G. Naumovich and G. S. Avrunin. A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel. In Proceedings of the 6th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 24--34, Nov. 1998.
[24]
G. Naumovich, G. S. Avrunin, and L. A. Clarke. Data flow analysis for checking properties of concurrent Java programs. In Proceedings of the 21st International Conference on Software Engineering, pages 399--410, May 1999.
[25]
K. M. Olender and L. J. Osterweil. Interprocedural static analysis of sequencing constraints. ACM Transactions on Software Engineering and Methodology, 1(1):21--52, Jan. 1992.
[26]
Rutgers University Programming Languages Research Group. PROLANGS. http://www.prolangs.rutgers.edu/public.html, 1999.
[27]
M. Weiser. Program slicing. IEEE Transactions on Software Engineering, SE-10(4):352--357, July 1984.
[28]
J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, pages 187--206, Oct. 1999.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PASTE '02: Proceedings of the 2002 ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
November 2002
92 pages
ISBN:1581134797
DOI:10.1145/586094
  • cover image ACM SIGSOFT Software Engineering Notes
    ACM SIGSOFT Software Engineering Notes  Volume 28, Issue 1
    January 2003
    83 pages
    ISSN:0163-5948
    DOI:10.1145/634636
    Issue’s Table of Contents
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: 18 November 2002

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. algorithm implementation
  2. data flow analysis
  3. static analysis

Qualifiers

  • Article

Conference

PASTE02

Acceptance Rates

PASTE '02 Paper Acceptance Rate 9 of 26 submissions, 35%;
Overall Acceptance Rate 57 of 159 submissions, 36%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)24
  • Downloads (Last 6 weeks)1
Reflects downloads up to 29 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Using the observer design pattern for implementation of data flow analysesACM SIGSOFT Software Engineering Notes10.1145/634636.58610728:1(61-68)Online publication date: 26-Feb-2019
  • (2017)Tizen .NET Memory Profiler2017 Ivannikov ISPRAS Open Conference (ISPRAS)10.1109/ISPRAS.2017.00014(39-44)Online publication date: Nov-2017
  • (2011)Element RepresentationsHaptic Systems Architecture Modeling10.1007/978-3-7091-0755-3_5(51-85)Online publication date: 3-Sep-2011
  • (2006)Implementation of Asset Health Assessment System with Pattern-Oriented Design and Practice2006 3rd International IEEE Conference Intelligent Systems10.1109/IS.2006.348499(666-671)Online publication date: Sep-2006

View Options

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