Rafael Fontes Sumitani, Lucas Victor da Silva Costa, Frederico F. Campos, Fernando Magno Quintão Pereira
{"title":"基于牛顿多项式插值的经验复杂性分析方法","authors":"Rafael Fontes Sumitani, Lucas Victor da Silva Costa, Frederico F. Campos, Fernando Magno Quintão Pereira","doi":"10.1016/j.cola.2025.101347","DOIUrl":null,"url":null,"abstract":"<div><div>A cost model is a function that relates how often each part of a program runs depending on its inputs. Cost models can be derived automatically via the observation of counters: instrumentation that tracks execution of program operations. This paper defines Newton Counters: counters that can be described via a polynomial ranging on a single program input variable whose value can be read in constant time. Additionally, it shows that Newton Counters are prevalent in actual codes. Motivated by this observation, the paper introduces a methodology to derive automatic cost models. Said methodology combines static code analyses with interpolation via Newton’s divided difference method. This approach is currently available as a tool, <span>Merlin</span>. The effectiveness of this tool is demonstrated on 949 executable C programs taken from the <span>Jotai</span> collection, and on <span>genann</span>, a neural network library.</div></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"84 ","pages":"Article 101347"},"PeriodicalIF":1.8000,"publicationDate":"2025-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A methodology for empirical complexity analysis based on Newton’s polynomial interpolation\",\"authors\":\"Rafael Fontes Sumitani, Lucas Victor da Silva Costa, Frederico F. Campos, Fernando Magno Quintão Pereira\",\"doi\":\"10.1016/j.cola.2025.101347\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>A cost model is a function that relates how often each part of a program runs depending on its inputs. Cost models can be derived automatically via the observation of counters: instrumentation that tracks execution of program operations. This paper defines Newton Counters: counters that can be described via a polynomial ranging on a single program input variable whose value can be read in constant time. Additionally, it shows that Newton Counters are prevalent in actual codes. Motivated by this observation, the paper introduces a methodology to derive automatic cost models. Said methodology combines static code analyses with interpolation via Newton’s divided difference method. This approach is currently available as a tool, <span>Merlin</span>. The effectiveness of this tool is demonstrated on 949 executable C programs taken from the <span>Jotai</span> collection, and on <span>genann</span>, a neural network library.</div></div>\",\"PeriodicalId\":48552,\"journal\":{\"name\":\"Journal of Computer Languages\",\"volume\":\"84 \",\"pages\":\"Article 101347\"},\"PeriodicalIF\":1.8000,\"publicationDate\":\"2025-07-21\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Computer Languages\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S2590118425000334\",\"RegionNum\":3,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computer Languages","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2590118425000334","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
A methodology for empirical complexity analysis based on Newton’s polynomial interpolation
A cost model is a function that relates how often each part of a program runs depending on its inputs. Cost models can be derived automatically via the observation of counters: instrumentation that tracks execution of program operations. This paper defines Newton Counters: counters that can be described via a polynomial ranging on a single program input variable whose value can be read in constant time. Additionally, it shows that Newton Counters are prevalent in actual codes. Motivated by this observation, the paper introduces a methodology to derive automatic cost models. Said methodology combines static code analyses with interpolation via Newton’s divided difference method. This approach is currently available as a tool, Merlin. The effectiveness of this tool is demonstrated on 949 executable C programs taken from the Jotai collection, and on genann, a neural network library.