The structure of a compiler for the ECSP language is described. ECSP is a concurrent language extending Hoare's CSP: it supports dynamic communication channels and nested processes. The compilation of ECPS programs is obtained by the composition of several tools of minimal functionalities.A set of static checks on interactions between concurrent processes is described. The checks verify the mutual consistency of the interfaces of processes: an interface is given by a set of input/output channels connecting a process to its partners. It is shown that the amount and the coverage of checks depend on the entities referred to in interprocess communication constructs and that both increase with the adoption of explicit naming.The checks on process interfaces are carried on in several tool of the compiler front-end to achieve machine independence. To support separate compilation, each tool can be applied to a subset of the processes of a program.
{"title":"Static checking of interprocess communication in ECSP","authors":"F. Baiardi, L. Ricci, M. Vanneschi","doi":"10.1145/502874.502903","DOIUrl":"https://doi.org/10.1145/502874.502903","url":null,"abstract":"The structure of a compiler for the ECSP language is described. ECSP is a concurrent language extending Hoare's CSP: it supports dynamic communication channels and nested processes. The compilation of ECPS programs is obtained by the composition of several tools of minimal functionalities.A set of static checks on interactions between concurrent processes is described. The checks verify the mutual consistency of the interfaces of processes: an interface is given by a set of input/output channels connecting a process to its partners. It is shown that the amount and the coverage of checks depend on the entities referred to in interprocess communication constructs and that both increase with the adoption of explicit naming.The checks on process interfaces are carried on in several tool of the compiler front-end to achieve machine independence. To support separate compilation, each tool can be applied to a subset of the processes of a program.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"30 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116798955","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
A portable compiler for the Modula-2 programming language has been implemented with a simple, machine independent optimizer. The front end of the compiler generates a dialect of P-code, and the back end translates the P-code into machine language. The compiler fits well in the Unix environment.The design philosophy of the compiler "best simple". Whenever possible, design decisions were made to favor the simplest alternative that got us most of what we wanted. Benchmark results show that the code quality is comparable to or better than other good compilers.
{"title":"A portable optimizing compiler for Modula-2","authors":"M. L. Powell","doi":"10.1145/502874.502905","DOIUrl":"https://doi.org/10.1145/502874.502905","url":null,"abstract":"A portable compiler for the Modula-2 programming language has been implemented with a simple, machine independent optimizer. The front end of the compiler generates a dialect of P-code, and the back end translates the P-code into machine language. The compiler fits well in the Unix environment.The design philosophy of the compiler \"best simple\". Whenever possible, design decisions were made to favor the simplest alternative that got us most of what we wanted. Benchmark results show that the code quality is comparable to or better than other good compilers.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"41 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125317490","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
For many years, the generally accepted methods for solving global data flow analysis problems (GDFAPs) have relied on the bit vector paradigm [Alle 70] [Kenn 81]. In these algorithms, the information for each variable is represented as a position in a bit vector. These vectors are propagated from node to node during the analysis of the program.This paper investigates a different paradigm for solving GDFAPs. In this strategy, the data flow solution for each variable is computed independently. A new algorithm for solving some GDFAPs is presented here. While it is expected that this algorithm will run slower in the batch compiling environment, there are conditions under which this algorithm can be expected to be superior to those in the bit vector class.
{"title":"Incremental data flow analysis in a structured program editor","authors":"F. K. Zadeck","doi":"10.1145/502874.502888","DOIUrl":"https://doi.org/10.1145/502874.502888","url":null,"abstract":"For many years, the generally accepted methods for solving global data flow analysis problems (GDFAPs) have relied on the bit vector paradigm [Alle 70] [Kenn 81]. In these algorithms, the information for each variable is represented as a position in a bit vector. These vectors are propagated from node to node during the analysis of the program.This paper investigates a different paradigm for solving GDFAPs. In this strategy, the data flow solution for each variable is computed independently. A new algorithm for solving some GDFAPs is presented here. While it is expected that this algorithm will run slower in the batch compiling environment, there are conditions under which this algorithm can be expected to be superior to those in the bit vector class.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"11 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132088061","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
J. A. Fisher, J. R. Ellis, J. Ruttenberg, A. Nicolau
Multiprocessors and vector machines, the only successful parallel architectures, have coarse-grained parallelism that is hard for compilers to take advantage of. We've developed a new fine-grained parallel architecture and a compiler that together offer order-of-magnitude speedups for ordinary scientific code.
{"title":"Parallel processing: a smart compiler and a dumb machine","authors":"J. A. Fisher, J. R. Ellis, J. Ruttenberg, A. Nicolau","doi":"10.1145/502874.502878","DOIUrl":"https://doi.org/10.1145/502874.502878","url":null,"abstract":"Multiprocessors and vector machines, the only successful parallel architectures, have coarse-grained parallelism that is hard for compilers to take advantage of. We've developed a new fine-grained parallel architecture and a compiler that together offer order-of-magnitude speedups for ordinary scientific code.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"89 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132794507","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
To understand when it is safe to apply a given optimization, a compiler must have explicit knowledge about the impact of executing individual statements on the values of variables accessible to the statements. The impact of a statement is termed its side effect. This paper describes a method for annotating each statement s in a program with a set MOD(s) conraining those variables whose values can be changed as a result of executing s. For statements which contain no procedure calls, the side effects can be determined by simple examination of the statement with some knowledge of the semantics of the source language.
{"title":"Efficient computation of flow insensitive interprocedural summary information","authors":"K. Cooper, K. Kennedy","doi":"10.1145/502874.502898","DOIUrl":"https://doi.org/10.1145/502874.502898","url":null,"abstract":"To understand when it is safe to apply a given optimization, a compiler must have explicit knowledge about the impact of executing individual statements on the values of variables accessible to the statements. The impact of a statement is termed its side effect. This paper describes a method for annotating each statement s in a program with a set MOD(s) conraining those variables whose values can be changed as a result of executing s. For statements which contain no procedure calls, the side effects can be determined by simple examination of the statement with some knowledge of the semantics of the source language.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"18 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122348639","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This paper describes an approach to incremental compilation that allows a complete incremental compiler to be generated from a simple language description. This description is in two parts. The first consists of an abstract syntax annotated with a powerful language for specifying the local semantics. The second consists of separate specifications detailing the uses of symbols, data types and expressions in the language. The approach operates in two stages. The first stage builds a local model of the semantics. The second propagates local changes into a global semantics. This approach has been used as part of the PECAN system for generating program development environments at Brown University.
{"title":"An approach to incremental compilation","authors":"S. Reiss","doi":"10.1145/502874.502889","DOIUrl":"https://doi.org/10.1145/502874.502889","url":null,"abstract":"This paper describes an approach to incremental compilation that allows a complete incremental compiler to be generated from a simple language description. This description is in two parts. The first consists of an abstract syntax annotated with a powerful language for specifying the local semantics. The second consists of separate specifications detailing the uses of symbols, data types and expressions in the language. The approach operates in two stages. The first stage builds a local model of the semantics. The second propagates local changes into a global semantics. This approach has been used as part of the PECAN system for generating program development environments at Brown University.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"77 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126166956","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
A new language is introduced for the specification of semantic analysis of programming languages. The language is based on the concept of one-pass attribute grammars. Various extensions of this basic formalism are incorporated in the language, including disciplined global variables, facilities for symbol processing, and features supporting semantic error detection and recovery. To encourage the writing of declarative specifications the language is nonterminal-oriented, in contrast to the production-oriented languages traditionally used in compiler writing systems.
{"title":"A specification language for one-pass semantic analysis","authors":"K. Koskimies","doi":"10.1145/502874.502892","DOIUrl":"https://doi.org/10.1145/502874.502892","url":null,"abstract":"A new language is introduced for the specification of semantic analysis of programming languages. The language is based on the concept of one-pass attribute grammars. Various extensions of this basic formalism are incorporated in the language, including disciplined global variables, facilities for symbol processing, and features supporting semantic error detection and recovery. To encourage the writing of declarative specifications the language is nonterminal-oriented, in contrast to the production-oriented languages traditionally used in compiler writing systems.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"21 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130210126","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
The descriptive techniques of formal semantics can be used for the generation of complete prototype compilers. First, we review the essential characteristics of such semantics implementation systems, and discuss our experience with two existing experimental systems. Then, we show how to derive a complete conventional compiler for a small language from its denotational semantics. The compiler is specified in three phases consisting of a front-end (parser, tree builder, and semantic checker), a translator from syntax trees to prefix code, and a code generator which converts the prefix code into IBM/370 style assembly code. The translator component is obtained by modifying the standard semantics of the language in two steps: first, the semantic domains and the equations are rewritten in a straight forward way to achieve a normal form, and then the auxiliary semantic functions are interpreted as instructions for a prefix code machine. The entire three part specification has been implemented with the help of Paulson's semantics processing system.
{"title":"Compiler prototyping using formal semantics","authors":"U. F. Pleban","doi":"10.1145/502874.502883","DOIUrl":"https://doi.org/10.1145/502874.502883","url":null,"abstract":"The descriptive techniques of formal semantics can be used for the generation of complete prototype compilers. First, we review the essential characteristics of such semantics implementation systems, and discuss our experience with two existing experimental systems. Then, we show how to derive a complete conventional compiler for a small language from its denotational semantics. The compiler is specified in three phases consisting of a front-end (parser, tree builder, and semantic checker), a translator from syntax trees to prefix code, and a code generator which converts the prefix code into IBM/370 style assembly code. The translator component is obtained by modifying the standard semantics of the language in two steps: first, the semantic domains and the equations are rewritten in a straight forward way to achieve a normal form, and then the auxiliary semantic functions are interpreted as instructions for a prefix code machine. The entire three part specification has been implemented with the help of Paulson's semantics processing system.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134301908","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This paper describes the application of a general data compression algorithm to assembly code. The system is retargetable and generalizes cross-jumping and procedural abstraction. It can be used as a space optimizer that trades time for space, it can turn assembly code into interpretive code, and it can help formalize and automate the traditionally ad hoc design of both real and abstract machines.
{"title":"Analyzing and compressing assembly code","authors":"C. Fraser, E. Myers, A. L. Wendt","doi":"10.1145/502874.502886","DOIUrl":"https://doi.org/10.1145/502874.502886","url":null,"abstract":"This paper describes the application of a general data compression algorithm to assembly code. The system is retargetable and generalizes cross-jumping and procedural abstraction. It can be used as a space optimizer that trades time for space, it can turn assembly code into interpretive code, and it can help formalize and automate the traditionally ad hoc design of both real and abstract machines.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"38 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126604114","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This paper is devoted to the construction of recursive evaluators for strongly non-circular attribute grammars. This class of attribute grammars is very large and includes every practical example ; testing strong non-circularity can be done in polynomial time. To each synthesized attribute, a function is associated, which takes as parameters a derivation tree and the values of some inherited attributes, and returns the value of that attribute at the root of the tree. These functions are mutually recursive according to the structure of the full parse tree. This method implements a dynamic "evaluation by need", reducing the number of attributes computed to those necessary to get the "semantic value" of the full tree. A Lisp implementation allowing automatic efficient storage management is also presented, together with some applications. Our work is closely related to those of Kennedy and Warren, Saarinen and Katamaya, but our method is more efficient and has a better theoretical basis.
{"title":"Strongly non-circular attribute grammars and their recursive evaluation","authors":"M. Jourdan","doi":"10.1145/502874.502882","DOIUrl":"https://doi.org/10.1145/502874.502882","url":null,"abstract":"This paper is devoted to the construction of recursive evaluators for strongly non-circular attribute grammars. This class of attribute grammars is very large and includes every practical example ; testing strong non-circularity can be done in polynomial time. To each synthesized attribute, a function is associated, which takes as parameters a derivation tree and the values of some inherited attributes, and returns the value of that attribute at the root of the tree. These functions are mutually recursive according to the structure of the full parse tree. This method implements a dynamic \"evaluation by need\", reducing the number of attributes computed to those necessary to get the \"semantic value\" of the full tree. A Lisp implementation allowing automatic efficient storage management is also presented, together with some applications. Our work is closely related to those of Kennedy and Warren, Saarinen and Katamaya, but our method is more efficient and has a better theoretical basis.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126667978","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}