[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-657625-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-657625-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","lecture-25-data-flow-and-dependence-graphs-white-box-testing","Lecture 25 - Data Flow and Dependence Graphs - White-Box Testing","","Lecture 25 introduces white-box testing with a focus on data-flow and dependence representations. It explains how flow graphs model control-flow and data-flow relationships, then uses an Ada sample program to illustrate control-flow graphs (CFG) and program dependence graphs (PDG). The lecture defines control dependence graphs (CDG) and data dependence graphs (DDG), and shows how dependence guides coverage criteria and minimizes retesting. Finally, it outlines regression test selection using CDG comparison and dependence-equivalent regions.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/lecture-25-data-flow-and-dependence-graphs-white-box-testing/657625/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/lecture-25-data-flow-and-dependence-graphs-white-box-testing/657625.png","ImageObject",300,407,{"name":42,"@type":43},"asda1da","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-30","2026-10-26",true,{"@type":52,"interactionType":53,"userInteractionCount":26},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What are control-flow and data-flow graphs used to represent?","Question",{"text":62,"@type":63},"A control-flow graph models the partial order of statement execution based on language semantics, while data-flow describes how values flow from variable definitions to their uses.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How does a coverage-based white-box testing criterion select tests?",{"text":67,"@type":63},"It selects a test set T such that executing the program for each test input traverses every path from each variable definition to each variable use in the control/data flow graph at least once.",{"name":69,"@type":60,"acceptedAnswer":70},"What is the key idea behind minimizing retesting during regression testing?",{"text":71,"@type":63},"Only tests affected by changes should be selected, using dependency analysis with coarse module relationships and fine-level control/data flow program dependence graphs.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},657625,1793136609,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":26,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":105,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":143,"read_time":144},3985747861852,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","| Lecture 25:\u003Cbr>Data Flow and Dependence Graphs\u003Cbr>Kenneth M. Anderson Foundations of Software Engineering CSCI 5828-Spring Semester, 1999\u003Cbr>Lecture 25 | 1 |\n| --- | --- |\n\nToday’s Lecture  \n• White-Box Testing  \n– Data Flow Graphs  \n• Minimum Retesting  \n– Program Dependence Graphs  \n• Control Dependence Graphs  \n• Data Dependence Graphs  \nLecture 25 2  \n\n| Flow Graphs\u003Cbr>Graph representation of control flow and data flow relationships\u003Cbr>• Control Flow\u003Cbr>The partial order of statement execution, as\u003Cbr>defined by the semantics of the language • Data Flow |  |\n| --- | --- |\n| The flow of values from definitions of a variable to its uses\u003Cbr>Lecture 25 | 3 |\n\nA Sample Ada Program to Test  \n1 function P return INTEGER is  \n2 begin  \n3 X, Y: INTEGER;  \n4 READ(X); READ(Y);  \n5 while (X > 10) loop  \n6 X := X – 10;  \n7 exit when X = 10;  \n8 end loop;  \n9 if (Y \u003C 20 and then X mod 2 = 0) then  \n10 Y := Y + 20;  \n11 else  \n12 Y := Y – 20;  \n13 end if;  \n14 return 2 ∗ X + Y;  \n15 end P;  \nLecture 25 4  \nP’s Control Flow Graph (CFG)  \n2,3,4  \n5  \n6  \n9′  \n10  \n12  \n14  \nF T  \n9  \n7  \nT  \n F  \nT  \nT  \nF  \nF  \nLecture 25 5  \nP’s CFG with a Data Flow Edge  \n2,3,4  \n5  \n6  \n9′  \n10  \n12  \n14  \nF T  \n9  \n7  \nT  \n F  \nT  \nT  \nF  \nF  \nLecture 25 6  \nP’s Control/Data Flow Graph  \nY   \n  X  \n    ~~ ~~~~ ~~ ~~ ~~   ~~ ~~ ~~ ~~ XX~~ ~~ ~~ ~~  \n   Y    \n X X  F X     \n  T  T  T   \n2,3,4  5  F  9  T  9′ 14  X    F    \n~~ ~~ ~~ ~~ ~~ ~~  ~~ ~~  ~~ ~~  Y       ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~  ~~ ~~  Y   \nX    \nY    X  \nLecture 25    7  \nWhite-box Testing Criteria  \n• Use Coverage  \nSelect a test set T such that, by executing P for each d in T, all paths leading from each definition of a variable to each use of that variable in P’s control/data flow graph are traversed at least once  \nLecture 25 8  \nP’s Control/Data Flow Graph  \nLecture 25  \n9  \n2,3,4  \n5  \n9′  \n10  \nY   \n     X   \n  X     \nX     \n  Y    \n X X F X     \nT  \nF  \n9  \nT  \nF  \nHow many test cases are needed?   \nT  \nF  \n7  \nT  \n| Minimizing Retesting\u003Cbr>• Test Only What Is Affected by a Change\u003Cbr>• Key: Dependency Analysis\u003Cbr>Also used for optimization, parallelization,…\u003Cbr>• At Coarse Level, Module Relationships Uses, calls, imports, includes,…\u003Cbr>• At Fine Level, Control and Data Flow Program dependence graphs\u003Cbr>Lecture 25 | 10 |\n| --- | --- |\n\nProgram Dependence Graph (PDG)  \n• Summary Representation of“Dependence”  \n• Nodes Are Either Statements or Predicates or the Special Node “Entry’’  \n• Two Kinds of Edges  \n– Control dependence edge  \n– Data dependence edge  \n• Two Subgraphs Induced by the Edges  \nLecture 25 11  \nControl Dependence Graph (CDG)  \n• Informal Definition  \n– For nodes X and Y in a CFG, Y is control dependent on X if, during execution, X can directly affect whether Y is executed  \nLecture 25 12  \nControl Dependence Graph (CDG)  \n• Formal Definition  \n– Let X and Y be nodes in a CFG. If Y appears on every path from X to the exit node, where Y != X, then Y post-dominates X.  \n– There is a control dependence from X to Y with label Liff:  \n• there is a non-null path p from X to Y, starting with edge L, such that Y post-dominates every node strictly between X and Y on p; and  \n• Y does not post-dominate X.  \nLecture 25 13  \n\n| P’s Control Dependence Graph |\n| --- |\n| \u003Cbr>\u003Cbr>|\n| Lecture 25 14 |\n\n\n| P’s Control Dependence Graph |\n| --- |\n| \u003Cbr>\u003Cbr>|\n| Lecture 25 15 |\n\n\n| P’s Control Dependence Graph |\n| --- |\n| \u003Cbr>\u003Cbr>|\n| Lecture 25 16 |\n\nData Dependence Graph (DDG)  \n• Informal Definition  \n– Two statements are data dependent if they might reference the same memory location and one of the references is an assignment to the memory location  \nLecture 25 17  \nData Dependence Graph (DDG)  \n• Formal Definition  \n– Let X and Y be nodes in a CFG. There is a data dependence from X to Y with respect to a variable v iff there is a non-null path p from X to Y with no intervening definition of v and either:  \n• X contains a definition of v and Y a use ofv;  \n• X contains a use of v and","cbCairzn0twnfYje","https://ap.wps.com/l/cbCairzn0twnfYje","pdf",224492,"English","# Today’s Lecture\n## White-Box Testing\n## Minimum Retesting\n# Flow Graphs\n## Control Flow\n## Data Flow\n# Sample Ada Program and Graphs\n## Control Flow Graph (CFG)\n## Control/Data Flow Graph\n# White-box Testing Criteria\n## Use Coverage\n# Minimizing Retesting\n## Dependency Analysis\n# Program Dependence Graph (PDG)\n## Control and Data Dependence Edges\n# Control Dependence Graph (CDG)\n## Informal Definition\n## Formal Definition\n# Data Dependence Graph (DDG)\n## Informal Definition\n## Formal Definition\n# Minimum Regression Testing\n## Goals\n## Test Selection Algorithm\n# Modifications","[{\"question\":\"What are control-flow and data-flow graphs used to represent?\",\"answer\":\"A control-flow graph models the partial order of statement execution based on language semantics, while data-flow describes how values flow from variable definitions to their uses.\"},{\"question\":\"How does a coverage-based white-box testing criterion select tests?\",\"answer\":\"It selects a test set T such that executing the program for each test input traverses every path from each variable definition to each variable use in the control/data flow graph at least once.\"},{\"question\":\"What is the key idea behind minimizing retesting during regression testing?\",\"answer\":\"Only tests affected by changes should be selected, using dependency analysis with coarse module relationships and fine-level control/data flow program dependence graphs.\"}]","Lecture 25 - Data Flow and Dependence Graphs - White-Box Testing | PDF",1792985436,18]