{"title":"使用基于决策树的提升分析的定量程序绘制","authors":"Aleksandar S. Dimovski","doi":"10.1016/j.cola.2023.101206","DOIUrl":null,"url":null,"abstract":"<div><p>We present a novel approach for resolving numerical program sketches under Boolean and quantitative objectives. The input is a program sketch, which represents a partial program with missing numerical parameters (holes). The aim is to automatically synthesize values for the parameters, such that the resulting complete program satisfies: a <em>Boolean (qualitative) specification</em> given in the form of assertions; and a <em>quantitative specification</em> that estimates the number of execution steps to termination and which the synthesizer is expected to optimize.</p><p>To address the above quantitative sketching problem, we encode a program sketch as a program family (a.k.a. Software Product Line) and use the specifically designed lifted analysis algorithms based on abstract interpretation for efficiently analyzing program families with numerical features. The elements of the lifted analysis domain are <em>decision trees</em>, in which decision nodes are labeled with linear constraints defined over numerical features and leaf nodes belong to an existing single-program analysis domain. First, we transform a program sketch into a program family, such that numerical holes correspond to numerical features and all possible sketch realizations correspond to variants in the program family. Then, we use a combination of forward (numerical) and backward (quantitative termination) lifted analysis of program families to find the variants (family members) that satisfy all assertions, and moreover are optimal with respect to the given quantitative objective. Such obtained variants represent the “correct & optimal” realizations of the given program sketch.</p><p>We present a prototype implementation of our approach within the <span>FamilySketcher</span>\n<!--> <!-->tool for resolving C sketches with numerical data types. We have evaluated our approach on a set of numerical benchmarks, and experimental results confirm the effectiveness of our approach. In some cases, our approach provides speedups against the well-known sketching tool <span>Sketch</span>\n<!--> <!-->and resolves some numerical benchmarks that <span>Sketch</span>\n<!--> <!-->cannot handle.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"75 ","pages":"Article 101206"},"PeriodicalIF":1.7000,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Quantitative program sketching using decision tree-based lifted analysis\",\"authors\":\"Aleksandar S. Dimovski\",\"doi\":\"10.1016/j.cola.2023.101206\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>We present a novel approach for resolving numerical program sketches under Boolean and quantitative objectives. The input is a program sketch, which represents a partial program with missing numerical parameters (holes). The aim is to automatically synthesize values for the parameters, such that the resulting complete program satisfies: a <em>Boolean (qualitative) specification</em> given in the form of assertions; and a <em>quantitative specification</em> that estimates the number of execution steps to termination and which the synthesizer is expected to optimize.</p><p>To address the above quantitative sketching problem, we encode a program sketch as a program family (a.k.a. Software Product Line) and use the specifically designed lifted analysis algorithms based on abstract interpretation for efficiently analyzing program families with numerical features. The elements of the lifted analysis domain are <em>decision trees</em>, in which decision nodes are labeled with linear constraints defined over numerical features and leaf nodes belong to an existing single-program analysis domain. First, we transform a program sketch into a program family, such that numerical holes correspond to numerical features and all possible sketch realizations correspond to variants in the program family. Then, we use a combination of forward (numerical) and backward (quantitative termination) lifted analysis of program families to find the variants (family members) that satisfy all assertions, and moreover are optimal with respect to the given quantitative objective. Such obtained variants represent the “correct & optimal” realizations of the given program sketch.</p><p>We present a prototype implementation of our approach within the <span>FamilySketcher</span>\\n<!--> <!-->tool for resolving C sketches with numerical data types. We have evaluated our approach on a set of numerical benchmarks, and experimental results confirm the effectiveness of our approach. In some cases, our approach provides speedups against the well-known sketching tool <span>Sketch</span>\\n<!--> <!-->and resolves some numerical benchmarks that <span>Sketch</span>\\n<!--> <!-->cannot handle.</p></div>\",\"PeriodicalId\":48552,\"journal\":{\"name\":\"Journal of Computer Languages\",\"volume\":\"75 \",\"pages\":\"Article 101206\"},\"PeriodicalIF\":1.7000,\"publicationDate\":\"2023-06-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Computer Languages\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S2590118423000163\",\"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/S2590118423000163","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
Quantitative program sketching using decision tree-based lifted analysis
We present a novel approach for resolving numerical program sketches under Boolean and quantitative objectives. The input is a program sketch, which represents a partial program with missing numerical parameters (holes). The aim is to automatically synthesize values for the parameters, such that the resulting complete program satisfies: a Boolean (qualitative) specification given in the form of assertions; and a quantitative specification that estimates the number of execution steps to termination and which the synthesizer is expected to optimize.
To address the above quantitative sketching problem, we encode a program sketch as a program family (a.k.a. Software Product Line) and use the specifically designed lifted analysis algorithms based on abstract interpretation for efficiently analyzing program families with numerical features. The elements of the lifted analysis domain are decision trees, in which decision nodes are labeled with linear constraints defined over numerical features and leaf nodes belong to an existing single-program analysis domain. First, we transform a program sketch into a program family, such that numerical holes correspond to numerical features and all possible sketch realizations correspond to variants in the program family. Then, we use a combination of forward (numerical) and backward (quantitative termination) lifted analysis of program families to find the variants (family members) that satisfy all assertions, and moreover are optimal with respect to the given quantitative objective. Such obtained variants represent the “correct & optimal” realizations of the given program sketch.
We present a prototype implementation of our approach within the FamilySketcher
tool for resolving C sketches with numerical data types. We have evaluated our approach on a set of numerical benchmarks, and experimental results confirm the effectiveness of our approach. In some cases, our approach provides speedups against the well-known sketching tool Sketch
and resolves some numerical benchmarks that Sketch
cannot handle.