{"title":"Prolog编译器中的存储管理","authors":"Y-L. Chang, P. T. Cox","doi":"10.1145/317559.322747","DOIUrl":null,"url":null,"abstract":"With the current intense interest in new computing paradigms based on logic, the efficient implementation of Prolog has become an issue of prime importance. Compiling Prolog involves some unique and difficult problems relating to storage management: in particular, the somewhat conflicting requirements of backtracking, and cut and tail recursion processing. The usual solution is to use garbage collection, an expensive process in small computers with limited storage. We describe a Prolog compiler which maintains the heap as lists of free records, to which records are released at the time they are deallocated, thus avoiding garbage collection. In this compiler, variable bindings are recorded in such a way that the speed of unification does not depend on the length of chains of bound variables. Also, tail recursion optimisation is more thorough than in other implementations.","PeriodicalId":154705,"journal":{"name":"Proceedings of the 1986 ACM SIGSMALL/PC symposium on Small systems","volume":"84 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1986-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Storage management in a Prolog compiler\",\"authors\":\"Y-L. Chang, P. T. Cox\",\"doi\":\"10.1145/317559.322747\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"With the current intense interest in new computing paradigms based on logic, the efficient implementation of Prolog has become an issue of prime importance. Compiling Prolog involves some unique and difficult problems relating to storage management: in particular, the somewhat conflicting requirements of backtracking, and cut and tail recursion processing. The usual solution is to use garbage collection, an expensive process in small computers with limited storage. We describe a Prolog compiler which maintains the heap as lists of free records, to which records are released at the time they are deallocated, thus avoiding garbage collection. In this compiler, variable bindings are recorded in such a way that the speed of unification does not depend on the length of chains of bound variables. Also, tail recursion optimisation is more thorough than in other implementations.\",\"PeriodicalId\":154705,\"journal\":{\"name\":\"Proceedings of the 1986 ACM SIGSMALL/PC symposium on Small systems\",\"volume\":\"84 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1986-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 1986 ACM SIGSMALL/PC symposium on Small systems\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/317559.322747\",\"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 the 1986 ACM SIGSMALL/PC symposium on Small systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/317559.322747","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
摘要
随着当前对基于逻辑的新计算范式的强烈兴趣,Prolog的有效实现已成为一个至关重要的问题。编译Prolog涉及到一些与存储管理相关的独特而困难的问题:特别是回溯和cut and tail递归处理的一些相互冲突的要求。通常的解决方案是使用垃圾收集,这在存储有限的小型计算机中是一个昂贵的过程。我们描述了一个Prolog编译器,它将堆维护为空闲记录列表,这些记录在被释放时被释放,从而避免了垃圾收集。在这个编译器中,变量绑定是以这样一种方式记录的,即统一的速度不依赖于绑定变量链的长度。此外,尾部递归优化比其他实现更彻底。
With the current intense interest in new computing paradigms based on logic, the efficient implementation of Prolog has become an issue of prime importance. Compiling Prolog involves some unique and difficult problems relating to storage management: in particular, the somewhat conflicting requirements of backtracking, and cut and tail recursion processing. The usual solution is to use garbage collection, an expensive process in small computers with limited storage. We describe a Prolog compiler which maintains the heap as lists of free records, to which records are released at the time they are deallocated, thus avoiding garbage collection. In this compiler, variable bindings are recorded in such a way that the speed of unification does not depend on the length of chains of bound variables. Also, tail recursion optimisation is more thorough than in other implementations.