Enhanced Representation Of Data Flow Anomaly Detection For Teaching Evaluation T.Mamatha A.BalaRam Asst.Prof. in Dept. of CSE Assoc.Prof. in Dept of CSE SreeNidhi Institute of Science & Technology CMR Institute of Technology Yamnampet, Ghatkesar,Hyderabad, TS,INDIA-5030 Medchal, Hyderabad,TS,India -50 40 E-mail: mamathat7@gmail.com E-Mail:balaram.balaram@gamil.com Dr. D.S.R. Murthy Prof. & Head of CSE Geethanjali College of Engg & Tech Hyderabad-5030-TS-INDIA Email :dsrmurthy.406@gmail.com ABSTRACT In this paper we propose three letter sequence of action for dataflow anomaly detection and representing data flow model for each data object. When we represent the CFG for data object, it is not giving the information that the object is used for which purpose(whether for calculation, predicate or redefined) so we extend the representation for more understanding and also given the DFD for all possible situation for normal flow and anomaly flow. KEYWORDS:. Data Flow Testing, Data flow Anomaly Detection, Data flow model, control flow graph. INTRODUCTION Data-flow testing is the name given to a family of test strategies based on selecting paths through the program s control flow in order to explore sequences of events related to the status of data objects. For example, pick enough paths to assure that every data item has been initialized prior to its use, or that all objects have been used for something, if not then it is anomalous. Anomaly, it is an abnormal way of doing something. Example: x = f(y); x = f2(z); The second definition of x overrides the first Three types of abnormal situations with using variable. Type : Defined and then defined again N.Archana Asst.Prof. in Dept of CSE Sreenidhi Institute of Science & Technology Yamnampe, Ghatkesar, Hyderabad,TS,INDIA-30 Email: archana.nagelli@gmail.com Type 2: Undefined but referenced Type 3: Defined but not referenced In such situations. When your representing Data Flow Anomalies for two letter sequence of actions. as below. We face some difficulties in understand the concept. dd : harmless, suspicious dk : probably a bug. du : normal kd : normal kk : harmless, but probably a bug ku : a bug ud : normal. Redefinition. uk : normal uu : normal When you consider the situation ud, here it indicates that the object is used and redefined. but we have to assume that the object is defined already. For dk, here the data object is defined and killed without using. ud, here object is used and refined but it is not showing whether object is defined or not. so assumption is eliminated in our paper. We elaborated the representation so that it is www.ijrcct.org Page 292
very easy to understand and with a little practice, reasonably quick and straightforward to develop. Program actions are represented by d,k and u as below: Program Actions (d, k, u): Defined (created) - explicitly or implicitly(d) Killed (released ) - directly or indirectly (k) Used In a calculation - (c) In a predicate - (p) - directly(or)indirectly (u) 2. THREE LETTER SEQUENCE OF ACTIONS When your using data object for some purpose and representing using control flow graph or Data flow graph, It is not showing that whether the data object is used for calculation purpose, predicate purpose or for redefining. Here we extend the representation by using the notation as follows. D is for Defined, initialized or created (explicitlyor implicitly) o Redefined - Dr K is for killed or released (directly or indirectly) U for Usage o In calculation - Uc o In Predicate - Up Uc : Represents that object or variable is used for calculation purpose Up :Represents that object or variable is used for Predicate purpose. Dr : Represents that the object or variable is redefined The task or action to be performed on the object or variable is denoted by d,k and u( d for define, u for usage and k for killing). It follow sequence of task like first it should be defined then used for some purpose, lastly it can kill. indicates the nothing is happened on the current time Example: d-k indicates that object is defined and killed without using the object for any purpose. It giving more understanding of what happened to data object or variable. 2. Proposed Three letter sequence of Actions(d,u,k) : duk - normal duu - normal dku - Anomaly dkd - Probably a bug ddu - normal dud - normal udk - Anomaly ukd - Anomaly udd - Anomaly ukk - Anomaly uuk - Anomaly kdu - harmless, but suspicious kkk - Harmless kud - Anomaly kuu - Anomaly kdu - probably a Anomaly ddd - harmless but suspicious Leading dash and Trailing dash means, nothing happened form entry to current and trailing dash to mean nothing happened after that point. d- - - Harmless, Suspicious, defined but not used for any purpose after that point du- - Normal, Defined and used for some Purpose. d-k - Probably a Bug, Defined but Without using killed the object. -uk - Bug, Without Defining object is Used for calculation/predicate and killed 3. REPRESENTATION OF DATA OBJECT USING CONTROL FLOW GRAPH Constructing a simplified control flow graph from the given structured code is: Create a simplified flow graph for code given. For More understanding, Constructed flow graph for each data object and mentioned whether object is used for predicate purpose or Calculation Purpose. Example: an Z = b + --------- a - www.ijrcct.org Page 293
START INPUT a, b, n Z := 0 IF a = THEN Z := GOTO DONE r := c := POWER: c := c * a r := r + IF r <= n THEN Z := (c ) / (a ) DONE: Z := b + Z GO TO POWER END Fig : simplified flow graph for above program Fig 3: Control flow graph for the object c: c:= z:=(c-)/(a-), u c c:=c*a, u c Fig 4: Control flow graph for the object r: Read a,b,n Z=0 Z:= Z:=b+z 2 a:=? 5 6 P Y c:= r:= Z:=(c-)/ (a-) P2 Y r:=r+, c:=c*a r<n? r:= r:=r+ r<n, u p Fig 5: control flow graph for the object b: 3. Control Flow Graph for Each Data Object: Read b z:=b+z Fig 2: control flow graph for the object Z: u c hgfhf 2 5 6 z=0 z:= z :=b+z Z:= (c -)/(a-), u c 3 4 Fig 6: control flow graph for the object n: www.ijrcct.org Page 294
Read n Fig 7:control flow graph for the object a: r<n, u p 5. CONCLUSION The main objective of this enhancement is for better understanding of the data object usage. When the object is defined(d), but not yet used(u) or killed(k) It becomes anomalous, this kind of representation with two letter sequence have not proper understanding. So we extend the representation for more understanding. We propose flow graph for each data object to show how the object is used after it is defined. And finally we depict State graph, shows the anomalous states and some Normal states. Read a a:= 6. REFERENCES c:=c*a, u c z:=(c-)/(a-), u c 4. DATA FLOW ANOMALY STATE GRAPH u u u ukk udd udk uuk ukd duu duk dkd kdu ddu dud udk dku []. Software Testing Techniques, Boris Beizer, 2 nd Edition,Dream Tech Press. [2]LEE J. WHITE, BOGDAN WISZNIEWSKI Path Testing of Computer Programs withloops using a Tool for Simple Loop Patterns - SOFTWARE PRACTICE AND EXPERIENCE, VOL. 2(0). 075 02 (OCTOBER 99) [3] Philipp Hoschka, Christian Huitema Control flow graph analysis for automatic fast path implementation Published in: Proceedings «Second IEEE Workshop on the Architecture and Implementation of High Performance Communication Subsystems», Williamsburg, Virginia Sep. -3 993. [3] Bender, R.A., and Potorff, E.L. Basic testing: a dataflow analysis techniques. IBM System Development Division, Poughkeepsie Laboratory. [4] Clarke, L.A., Podgurski, A.,Richardson, D.J., and Zeil, S.J.A Comparison of data flow path selection criteria. IEEE Transactions on Software Engineering(985) [5]. Clarke, L.A., Podgurski, A.,Richardson, D.J., and Zeil, S.J.An Investigation of data flow path selection criteria. Workshop on Software Testing, Banff, Canada,986 [6] Fran Berman, Andrew Chien, Keith Cooper, Jack Dongarra, Ian Foster, Dennis Gannon, Lennart Johnsson, Ken Kennedy, Carl Kesselman, John Mellor-Crummey, Dan Reed, Linda Torczon, and Rich Wolski. The grads project: Software support for high-level grid application Development. Inernational Journal of High Performance Computing Applications, 5(4), Winter 200. www.ijrcct.org Page 295
[7]. Preston Briggs. Drawing control-flow graphs with style. July 994. Authors Mrs. N.Archana, Working as an Assistant Professor in Dept of C.S.E of sreenidhi Institute of Science & Technology. M.Tech in Software Engineering from JNTU, Hyderabad. B.Tech in C.S.E from JNTUH. She has more than 8 yrs of experience. Her Area of Interest is Wireless Sensor Network & Information Security Mrs. T.Mamatha, Working as an Assistant Professor in Dept of C.S.E of sreenidhi Institute of Science & Technology. M.Tech in Software Engineering from JNTU, Anantapur. B.Tech in C.S.E from JNTUH. Her Area of Interest is Software Engineering & Software Testing. Mr. A. Balaram working as Associate Professor in the Dept. Of Computer Science and Engineering, CMR Institute of Technology, Hyderabad, India. He has more than 0 years of teaching experience.. His research interests are Software Engineering, Image Processing, Net work Security and Cryptography. Dr. D. S. R. Murthy is currently working as a Professor & Head of the Dept of CSE in Geethanjali college of Engineering and Technology since June 204. Earlier he worked as a professor of Information Technology in Sreenidhi Institute of science and Technology from OCT 2004 to JUNE 20. Prior to that he was in NIT Warangal JNTUCE, Anantapur and ICFAI in different faculty positions of Computer Science. He is a Fellow of IETE, Senior Life Engineer (EI(I) & IETE). He published a text book on C Programming & Data Structures. His research interests are Image Processing, Image Cryptography and Data Mining. www.ijrcct.org Page 296