{"title":"Tracing Prolog programs by source instrumentation is efficient enough","authors":"Mireille Ducassé , Jacques Noyé","doi":"10.1016/S0743-1066(99)00061-8","DOIUrl":null,"url":null,"abstract":"<div><p>Tracing by automatic program source instrumentation has major advantages over compiled code instrumentation: it is more portable from one Prolog system to another, it produces traces in terms of the original program, and it can be tailored to specific debugging needs. The main argument usually put forward in favor of compiled code instrumentation is its supposed efficiency. We have compared the performances of two operational low-level Prolog tracers with source instrumentation. We have executed classical Prolog benchmark programs, collecting trace information without displaying it. On average, collecting trace information by program instrumentation is about as fast as using a low-level tracer in one case, and only twice slower in the other. This is a minor penalty to pay, compared to the advantages of the approach. To our knowledge, this is the first time that a quantitative comparison of both approaches is made for any programming language.</p></div>","PeriodicalId":101236,"journal":{"name":"The Journal of Logic Programming","volume":"43 2","pages":"Pages 157-172"},"PeriodicalIF":0.0000,"publicationDate":"2000-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0743-1066(99)00061-8","citationCount":"15","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The Journal of Logic Programming","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0743106699000618","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15
Abstract
Tracing by automatic program source instrumentation has major advantages over compiled code instrumentation: it is more portable from one Prolog system to another, it produces traces in terms of the original program, and it can be tailored to specific debugging needs. The main argument usually put forward in favor of compiled code instrumentation is its supposed efficiency. We have compared the performances of two operational low-level Prolog tracers with source instrumentation. We have executed classical Prolog benchmark programs, collecting trace information without displaying it. On average, collecting trace information by program instrumentation is about as fast as using a low-level tracer in one case, and only twice slower in the other. This is a minor penalty to pay, compared to the advantages of the approach. To our knowledge, this is the first time that a quantitative comparison of both approaches is made for any programming language.