{"title":"表达式依存图","authors":"Carlos Galindo, Sergio Pérez, Josep Silva","doi":"10.1016/j.jlamp.2024.101016","DOIUrl":null,"url":null,"abstract":"<div><div>The <em>system dependence graph</em> (SDG) is a widely used program representation for the static analysis of programs. In particular, it is the standard way to represent control and flow dependences between the statements of a program. It is at the core of program slicing, a technique that extracts the part of a program that can influence a given program point (the so-called slicing criterion). In this paper, we identify several program slicing situations (e.g., list comprehensions, <span>try-catch</span> and <span>for</span>) where the representation provided by the SDG is imprecise, and we present an alternative program representation, which is indeed an extension of the SDG, that solves these situations. We call this extension the <em>expression dependence graph</em> (EDG). The EDG redefines the SDG by increasing the granularity of its nodes to <em>abstract syntax tree</em> (AST) nodes. The implications of this change include an improvement in precision, the appearance of new kinds of dependences (besides control and flow dependences), and the possibility of selecting any (sub)expression as the slicing criterion.</div></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"142 ","pages":"Article 101016"},"PeriodicalIF":0.7000,"publicationDate":"2024-09-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2352220824000701/pdfft?md5=e1a070fcd4076ea5219a2aae17e4145c&pid=1-s2.0-S2352220824000701-main.pdf","citationCount":"0","resultStr":"{\"title\":\"The expression dependence graph\",\"authors\":\"Carlos Galindo, Sergio Pérez, Josep Silva\",\"doi\":\"10.1016/j.jlamp.2024.101016\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>The <em>system dependence graph</em> (SDG) is a widely used program representation for the static analysis of programs. In particular, it is the standard way to represent control and flow dependences between the statements of a program. It is at the core of program slicing, a technique that extracts the part of a program that can influence a given program point (the so-called slicing criterion). In this paper, we identify several program slicing situations (e.g., list comprehensions, <span>try-catch</span> and <span>for</span>) where the representation provided by the SDG is imprecise, and we present an alternative program representation, which is indeed an extension of the SDG, that solves these situations. We call this extension the <em>expression dependence graph</em> (EDG). The EDG redefines the SDG by increasing the granularity of its nodes to <em>abstract syntax tree</em> (AST) nodes. The implications of this change include an improvement in precision, the appearance of new kinds of dependences (besides control and flow dependences), and the possibility of selecting any (sub)expression as the slicing criterion.</div></div>\",\"PeriodicalId\":48797,\"journal\":{\"name\":\"Journal of Logical and Algebraic Methods in Programming\",\"volume\":\"142 \",\"pages\":\"Article 101016\"},\"PeriodicalIF\":0.7000,\"publicationDate\":\"2024-09-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://www.sciencedirect.com/science/article/pii/S2352220824000701/pdfft?md5=e1a070fcd4076ea5219a2aae17e4145c&pid=1-s2.0-S2352220824000701-main.pdf\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Logical and Algebraic Methods in Programming\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S2352220824000701\",\"RegionNum\":4,\"RegionCategory\":\"数学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, THEORY & METHODS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Logical and Algebraic Methods in Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2352220824000701","RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
The system dependence graph (SDG) is a widely used program representation for the static analysis of programs. In particular, it is the standard way to represent control and flow dependences between the statements of a program. It is at the core of program slicing, a technique that extracts the part of a program that can influence a given program point (the so-called slicing criterion). In this paper, we identify several program slicing situations (e.g., list comprehensions, try-catch and for) where the representation provided by the SDG is imprecise, and we present an alternative program representation, which is indeed an extension of the SDG, that solves these situations. We call this extension the expression dependence graph (EDG). The EDG redefines the SDG by increasing the granularity of its nodes to abstract syntax tree (AST) nodes. The implications of this change include an improvement in precision, the appearance of new kinds of dependences (besides control and flow dependences), and the possibility of selecting any (sub)expression as the slicing criterion.
期刊介绍:
The Journal of Logical and Algebraic Methods in Programming is an international journal whose aim is to publish high quality, original research papers, survey and review articles, tutorial expositions, and historical studies in the areas of logical and algebraic methods and techniques for guaranteeing correctness and performability of programs and in general of computing systems. All aspects will be covered, especially theory and foundations, implementation issues, and applications involving novel ideas.