{"title":"从Naïve到Norvig——如何获得PROLOG编译器","authors":"Arthur Nunes-Harwitt","doi":"10.1145/2635648.2635649","DOIUrl":null,"url":null,"abstract":"An interpreter is a concise definition of the semantics of a programming language and is easily implemented. A compiler is more difficult to construct, but the code that it generates runs faster than interpreted code. This paper introduces rules to transform an interpreter into a compiler, and then provides a concrete demonstration of the rules in the form of a derivation of a Prolog compiler, much like Norvig's, implemented in Common Lisp. This example also suggests that the approach can be applied to a wide range of interpreter implementations and related algorithms.","PeriodicalId":113396,"journal":{"name":"Proceedings of ILC 2014 on 8th International Lisp Conference","volume":"50 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-08-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"From Naïve to Norvig On Deriving a PROLOG Compiler\",\"authors\":\"Arthur Nunes-Harwitt\",\"doi\":\"10.1145/2635648.2635649\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"An interpreter is a concise definition of the semantics of a programming language and is easily implemented. A compiler is more difficult to construct, but the code that it generates runs faster than interpreted code. This paper introduces rules to transform an interpreter into a compiler, and then provides a concrete demonstration of the rules in the form of a derivation of a Prolog compiler, much like Norvig's, implemented in Common Lisp. This example also suggests that the approach can be applied to a wide range of interpreter implementations and related algorithms.\",\"PeriodicalId\":113396,\"journal\":{\"name\":\"Proceedings of ILC 2014 on 8th International Lisp Conference\",\"volume\":\"50 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2014-08-14\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of ILC 2014 on 8th International Lisp Conference\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2635648.2635649\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of ILC 2014 on 8th International Lisp Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2635648.2635649","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
From Naïve to Norvig On Deriving a PROLOG Compiler
An interpreter is a concise definition of the semantics of a programming language and is easily implemented. A compiler is more difficult to construct, but the code that it generates runs faster than interpreted code. This paper introduces rules to transform an interpreter into a compiler, and then provides a concrete demonstration of the rules in the form of a derivation of a Prolog compiler, much like Norvig's, implemented in Common Lisp. This example also suggests that the approach can be applied to a wide range of interpreter implementations and related algorithms.