• 沒有找到結果。

In this paper, the class relationship flow model, consisting of inheritance, association, and aggregation flows, has been proposed to analyze class libraries. With respect to these flows, each member within a class is associated with an operation to represent whether its status is defined or used. The concealed dependencies propagated along class relationships can be represented as a sequence of flow operations along a flow path. By representing a program as a class relationship graph, the flow analysis can be reduced to the graph reachability problem.

The interpretation of OO features can vary with program constructs in different languages, such as inheritance rules and object representation. Although Java programs were used for demonstration purposes in this paper, this flow model can be tailored to fit specific OO languages with minor modification for the interpretation of OO features. In addition, this flow model can give a user the ability to interpret behavior evolution, message passing, and object encapsulation in programs as sequences of flow operations. These operation sequences could be applied in various fields of OO software engineering, such as program understanding, anomaly detection, complexity measurement, and program testing.

Currently, we are improving the efficiency of the flow computation algorithms for the whole set of classes in a program. In the future, we plan to develop testing and mainte-nance tools based on this model, and plan to embed them within an integrated visual-pro-gramming environment [33].

Fig. 21. The CRG of Program IV.

ACKNOWLEDGEMENT

The authors would like to thank the referees, whose comments helped to improve the overall presentation. This research was sponsored by the MOEA and supported by the Insti-tute for Information Industry, Taiwan, R.O.C.

REFERENCES

1. D. L. Metayer, “Program analysis for software engineering: new applications, new requirements, new tools,” ACM SIGPLAN Notices, Vol. 32, No. 1, 1997, pp. 86-88.

2. S. Meyers and M. Klaus, “Examining C++ program analyzers,” Dr. Dobb’s Journal, No. 262, 1997, pp. 68-75.

3. D. C. Kung, J. Gao, P. Hsia, Y. Toyoshima, and C. Chen, “On regression testing of object-oriented programs,” Journal of Object-Oriented Programming, Vol. 8, No. 2, 1995, pp. 51-65.

4. G. Booch, Object-oriented Analysis and Design with Applications, Redwood City: Ben-jamin/Cummings, 1994.

5. J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and W. Lorensen, Object-oriented Modeling and Design, Prentice-Hall, Englewood Cliffs, NJ, 1991.

6. J. L. Chen and F. J. Wang, “Encapsulation in object-oriented programs,” ACM SIGPLAN Notices, Vol. 31, No. 7, 1996, pp. 30-32.

7. M. Lejter, S. Meyers, and S. P. Reiss, “Support for maintaining object-oriented programs,”

IEEE Transactions on Software Engineering, Vol. 18, No. 12, 1992, pp. 1045-1052.

8. P. K. Linos and V. Courtois, “A tool for understanding object-oriented program dependencies,” in Proceedings of IEEE Third Workshop on Program Comprehension, 1994, pp. 20-27.

9. J. L. Chen and F. J. Wang, “An inheritance flow model for class hierarchy analysis,”

Information Processing Letters, Vol. 66, No. 6, 1998, pp. 309-315.

10. M. S. Hecht, Flow Analysis of Computer Programs, Elsevier North-Holland, 1977.

11. J. Gosling, B. Joy, and G. Steele, The Java Language Specification, Addison-Wesley, Reading, Mass, 1996.

12. J. L. Chen, F. J. Wang, and Y. L. Chen, “An object-oriented dependency graph for program slicing,” in Proceedings of the 24th International Conference on Technology of Object-Oriented Languages and Systems (TOOLS 24), 1997, pp. 147-156.

13. F. E. Allen and J. Cocke, “A program data flow analysis procedure,” Communications of the ACM, Vol. 19, No. 3, 1976, pp. 137-147.

14. S. S. Muchnick and N. D. Jones, Program Flow Analysis: Theory and Applications, Prentice-Hall Inc., 1981.

15. J. Ferrante, K. J. Ottenstein, and J. D. Warren, “The program dependence graph and its use in optimization,” ACM Transactions on Programming Languages and Systems, Vol. 9, No. 3, 1987, pp. 319-349.

16. S. Horwitz and T. Reps, “The use of program dependence graphs in software engineering,” in Proceedings of the 14th International Conference on Software Engineering, 1992, pp.

392-411.

17. M. Weiser, “Program slicing,” IEEE Transactions on Software Engineering, Vol. 10, No. 4, 1984, pp. 352-357.

18. S. S. Yau and S. S. Liu, Some Approaches to Logical Ripple-effect Analysis, Software Engineering Research Center, SERC-TR-24F, University of Florida, 1988.

19. M. Sudholt and C. Steigner, “On interprocedural data flow analysis for object oriented languages,” Lecture Notes in Computer Science, Vol. 641, 1992, pp. 156-162.

20. K. D. Cooper and K. Kennedy, “Interprocedural side-effect analysis in linear time,” in Proceedings of the SIGPLAN ’88 Conference on Programming Language Design and Implementation, 1988, pp. 57-66.

21. S. Subramanian, W. T. Tsai, and S. H. Kirani, “Hierarchical data flow analysis for O-O programs,” Journal of OOP, Vol. 7, No. 2, 1994, pp. 36-46.

22. A. V. Aho, R. Sethi, and J. D. Ullman, Compilers - Principles, Techniques, and Tools, Addison-Wesley, 1986.

23. M..J. Harrold and G. Rothermel, “Performing data flow testing on classes,” in Pro-ceedings of the Second ACM SIGSOFT Symposium on Foundations of Software Engi-neering of ACM, 1994, pp. 154-163.

24. J. L. Chen, F. J. Wang, and Y. L. Chen, “The development of a flow analysis tool for software reuse,” in Proceedings of the Third Symposium on Computer & Communica-tion Technology, 1997, pp. 200-207.

25. B. Stroustrup, The C++ Programming Language, Addison-Wesley, Reading, MA, sec-ond edition, 1991.

26. P. Steyaert, C. Lucas, K. Mens, and T. D’Hondt, “Reuse contracts: managing the evo-lution of reusable assets,” in Proceedings of Conference on Object-Oriented Program-ming Systems, Languages, and Applications of ACM, 1996, pp. 268-285.

27. J. C. Huang, “Detection of data flow anomaly through program instrumentation,” IEEE Transactions on Software Engineering, Vol. SE-5, No. 3, 1979, pp. 226-236.

28. S. C. Ntafos, “A comparison of some structural testing strategies,” IEEE Transaction on Software Engineering, Vol. 14, No. 6, 1988, pp. 868-874.

29. R. K. Doong and P. G. Frankl, “Case studies on testing object-oriented programs,” in Proceedings of the ACM SIGSOFT ’91 Fourth Symposium on Software Testing, Analysis, and Verification (TAV4), 1991, pp. 165-177.

30. A. S. Parrish, R. B. Borie, and D. W. Cordes, “Automated flow graph-based testing of object-oriented software modules,” Journal of System and Software, Vol. 23, No. 2, 1993, pp. 95-109.

31. M. D. Smith and D. J. Robson, “A framework for testing object-oriented programs,”

Journal of Object-Oriented Programming, Vol. 5, No. 3, 1992, pp. 45-53.

32. C. D. Turner and D. J. Robson, “The state-based testing of object-oriented programs,”

in Proceedings of IEEE Conference on Software Maintenance, 1993, pp. 302-310.

33. C. H. Hu and F. J. Wang, “Constructing an integrated visual programming environment,”

Software - Practice and Experience, 1998, to appear.

Feng-Jian Wang (¤ý¤ý¤ý¤ý¤ýÂ×Â×Â×Â×Â×°í°í°í°í°í) graduated from National Tai-wan University, Taipei, TaiTai-wan, R.O.C. in 1980. He received his M.S. and Ph.D. degree in E.E.C.S. from Northwestern University, U.S.A., in 1986 and 1988. He is currently a Professor in the De-partment of Computer Science and Information Engineering, Na-tional Chiao Tung University. His interests include Software Engineering, Compiler, Object-Oriented Techniques, and Distrib-uted System Software and Internet.

Jiun-Liang Chen (³¯³¯³¯³¯³¯«T«T«T«T«T¨}¨}¨}¨}¨}) was born in Taipei, Taiwan, R.O.

C., in 1969. He received his B.S. degree in Computer Science &

Information Engineering from National Chiao Tung University, R.

O.C., in 1992, and Ph.D. degree in Computer Science & Informa-tion Engineering from NaInforma-tional Chiao Tung University, R.O.C., in 1998. He has been a student member of ACM, IEEE, USENIX, and R.O.C. OOTSIG since 1994. His research interests include object-oriented programming, program analysis, distributed systems, soft-ware testing, and softsoft-ware maintenance.

相關文件