{"title":"揭示Fortran程序隐藏结构的一种方法","authors":"L. Meissner","doi":"10.1145/800182.810402","DOIUrl":null,"url":null,"abstract":"Program structure is inherent in program design; therefore special keywords such as \"<underline>if</underline>... <underline>then</underline> ... <underline>else</underline>” or \"<underline>do</underline> ... <underline>while</underline>” are useful only to the extent that they <italic>reveal</italic> that structure.\n A simple listing of Fortran program statements is ineffective for revealing program structure. Proposals have been made for manually inserting keywords, comments, indentations, etc., either during a separate preprocessing stage or during the normal coding process.\n We show how the <italic>flow graph</italic> can provide independent structural information. Although the flow graph may be said to exist as soon as a program has been designed, it is most readily generated from the program statements. “Bad” structure can be detected objectively, and “good” programs can be reconstituted to reveal their block structure more clearly. Our implementation is based on an algorithm suggested by Peterson et al (CACM, August 1973). We have extended this algorithm to automatically detect block exits.","PeriodicalId":204185,"journal":{"name":"ACM '74","volume":"15 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"A method to expose the hidden structure of Fortran programs\",\"authors\":\"L. Meissner\",\"doi\":\"10.1145/800182.810402\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Program structure is inherent in program design; therefore special keywords such as \\\"<underline>if</underline>... <underline>then</underline> ... <underline>else</underline>” or \\\"<underline>do</underline> ... <underline>while</underline>” are useful only to the extent that they <italic>reveal</italic> that structure.\\n A simple listing of Fortran program statements is ineffective for revealing program structure. Proposals have been made for manually inserting keywords, comments, indentations, etc., either during a separate preprocessing stage or during the normal coding process.\\n We show how the <italic>flow graph</italic> can provide independent structural information. Although the flow graph may be said to exist as soon as a program has been designed, it is most readily generated from the program statements. “Bad” structure can be detected objectively, and “good” programs can be reconstituted to reveal their block structure more clearly. Our implementation is based on an algorithm suggested by Peterson et al (CACM, August 1973). We have extended this algorithm to automatically detect block exits.\",\"PeriodicalId\":204185,\"journal\":{\"name\":\"ACM '74\",\"volume\":\"15 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1900-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACM '74\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/800182.810402\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM '74","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/800182.810402","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4
摘要
节目结构是节目设计所固有的;因此,诸如“if…”然后……否则“或”do…然而,“只有在它们揭示了这种结构的程度上才有用。一个简单的Fortran程序语句列表对于揭示程序结构是无效的。已经提出了在单独的预处理阶段或在正常编码过程中手动插入关键字、注释、缩进等的建议。我们展示了流图如何提供独立的结构信息。虽然流程图可以说在程序设计完成后就存在了,但它最容易从程序语句中生成。可以客观地发现“坏”结构,对“好”程序进行重构,更清晰地揭示其块结构。我们的实现基于Peterson等人(ccam, August 1973)提出的算法。我们扩展了这个算法来自动检测块退出。
A method to expose the hidden structure of Fortran programs
Program structure is inherent in program design; therefore special keywords such as "if... then ... else” or "do ... while” are useful only to the extent that they reveal that structure.
A simple listing of Fortran program statements is ineffective for revealing program structure. Proposals have been made for manually inserting keywords, comments, indentations, etc., either during a separate preprocessing stage or during the normal coding process.
We show how the flow graph can provide independent structural information. Although the flow graph may be said to exist as soon as a program has been designed, it is most readily generated from the program statements. “Bad” structure can be detected objectively, and “good” programs can be reconstituted to reveal their block structure more clearly. Our implementation is based on an algorithm suggested by Peterson et al (CACM, August 1973). We have extended this algorithm to automatically detect block exits.