Towards Automatic Resource Bound Analysis for OCaml. Hoffmann, J., Das, A., & Weng, S. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, of POPL 2017, pages 359–373, New York, NY, USA, 2017. ACM. ZSCC: 0000070 event-place: Paris, France
Paper doi abstract bibtex This article presents a resource analysis system for OCaml programs. The system automatically derives worst-case resource bounds for higher-order polymorphic programs with user-defined inductive types. The technique is parametric in the resource and can derive bounds for time, memory allocations and energy usage. The derived bounds are multivariate resource polynomials which are functions of different size parameters that depend on the standard OCaml types. Bound inference is fully automatic and reduced to a linear optimization problem that is passed to an off-the-shelf LP solver. Technically, the analysis system is based on a novel multivariate automatic amortized resource analysis (AARA). It builds on existing work on linear AARA for higher-order programs with user-defined inductive types and on multivariate AARA for first-order programs with built-in lists and binary trees. This is the first amortized analysis, that automatically derives polynomial bounds for higher-order functions and polynomial bounds that depend on user-defined inductive types. Moreover, the analysis handles a limited form of side effects and even outperforms the linear bound inference of previous systems. At the same time, it preserves the expressivity and efficiency of existing AARA techniques. The practicality of the analysis system is demonstrated with an implementation and integration with Inria's OCaml compiler. The implementation is used to automatically derive resource bounds for 411 functions and 6018 lines of code derived from OCaml libraries, the CompCert compiler, and implementations of textbook algorithms. In a case study, the system infers bounds on the number of queries that are sent by OCaml programs to DynamoDB, a commercial NoSQL cloud database service.
@inproceedings{hoffmann_towards_2017,
address = {New York, NY, USA},
series = {{POPL} 2017},
title = {Towards {Automatic} {Resource} {Bound} {Analysis} for {OCaml}},
isbn = {978-1-4503-4660-3},
url = {http://doi.acm.org/10.1145/3009837.3009842},
doi = {10/ggb9gh},
abstract = {This article presents a resource analysis system for OCaml programs. The system automatically derives worst-case resource bounds for higher-order polymorphic programs with user-defined inductive types. The technique is parametric in the resource and can derive bounds for time, memory allocations and energy usage. The derived bounds are multivariate resource polynomials which are functions of different size parameters that depend on the standard OCaml types. Bound inference is fully automatic and reduced to a linear optimization problem that is passed to an off-the-shelf LP solver. Technically, the analysis system is based on a novel multivariate automatic amortized resource analysis (AARA). It builds on existing work on linear AARA for higher-order programs with user-defined inductive types and on multivariate AARA for first-order programs with built-in lists and binary trees. This is the first amortized analysis, that automatically derives polynomial bounds for higher-order functions and polynomial bounds that depend on user-defined inductive types. Moreover, the analysis handles a limited form of side effects and even outperforms the linear bound inference of previous systems. At the same time, it preserves the expressivity and efficiency of existing AARA techniques. The practicality of the analysis system is demonstrated with an implementation and integration with Inria's OCaml compiler. The implementation is used to automatically derive resource bounds for 411 functions and 6018 lines of code derived from OCaml libraries, the CompCert compiler, and implementations of textbook algorithms. In a case study, the system infers bounds on the number of queries that are sent by OCaml programs to DynamoDB, a commercial NoSQL cloud database service.},
urldate = {2019-11-01},
booktitle = {Proceedings of the 44th {ACM} {SIGPLAN} {Symposium} on {Principles} of {Programming} {Languages}},
publisher = {ACM},
author = {Hoffmann, Jan and Das, Ankush and Weng, Shu-Chun},
year = {2017},
note = {ZSCC: 0000070
event-place: Paris, France},
keywords = {Amortized Analysis, LP Solving, Resource Bound Analysis, Static Analysis, Type Inference, Type Systems},
pages = {359--373}
}
Downloads: 0
{"_id":"BYwpx8SdraX45ui6R","bibbaseid":"hoffmann-das-weng-towardsautomaticresourceboundanalysisforocaml-2017","authorIDs":[],"author_short":["Hoffmann, J.","Das, A.","Weng, S."],"bibdata":{"bibtype":"inproceedings","type":"inproceedings","address":"New York, NY, USA","series":"POPL 2017","title":"Towards Automatic Resource Bound Analysis for OCaml","isbn":"978-1-4503-4660-3","url":"http://doi.acm.org/10.1145/3009837.3009842","doi":"10/ggb9gh","abstract":"This article presents a resource analysis system for OCaml programs. The system automatically derives worst-case resource bounds for higher-order polymorphic programs with user-defined inductive types. The technique is parametric in the resource and can derive bounds for time, memory allocations and energy usage. The derived bounds are multivariate resource polynomials which are functions of different size parameters that depend on the standard OCaml types. Bound inference is fully automatic and reduced to a linear optimization problem that is passed to an off-the-shelf LP solver. Technically, the analysis system is based on a novel multivariate automatic amortized resource analysis (AARA). It builds on existing work on linear AARA for higher-order programs with user-defined inductive types and on multivariate AARA for first-order programs with built-in lists and binary trees. This is the first amortized analysis, that automatically derives polynomial bounds for higher-order functions and polynomial bounds that depend on user-defined inductive types. Moreover, the analysis handles a limited form of side effects and even outperforms the linear bound inference of previous systems. At the same time, it preserves the expressivity and efficiency of existing AARA techniques. The practicality of the analysis system is demonstrated with an implementation and integration with Inria's OCaml compiler. The implementation is used to automatically derive resource bounds for 411 functions and 6018 lines of code derived from OCaml libraries, the CompCert compiler, and implementations of textbook algorithms. In a case study, the system infers bounds on the number of queries that are sent by OCaml programs to DynamoDB, a commercial NoSQL cloud database service.","urldate":"2019-11-01","booktitle":"Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages","publisher":"ACM","author":[{"propositions":[],"lastnames":["Hoffmann"],"firstnames":["Jan"],"suffixes":[]},{"propositions":[],"lastnames":["Das"],"firstnames":["Ankush"],"suffixes":[]},{"propositions":[],"lastnames":["Weng"],"firstnames":["Shu-Chun"],"suffixes":[]}],"year":"2017","note":"ZSCC: 0000070 event-place: Paris, France","keywords":"Amortized Analysis, LP Solving, Resource Bound Analysis, Static Analysis, Type Inference, Type Systems","pages":"359–373","bibtex":"@inproceedings{hoffmann_towards_2017,\n\taddress = {New York, NY, USA},\n\tseries = {{POPL} 2017},\n\ttitle = {Towards {Automatic} {Resource} {Bound} {Analysis} for {OCaml}},\n\tisbn = {978-1-4503-4660-3},\n\turl = {http://doi.acm.org/10.1145/3009837.3009842},\n\tdoi = {10/ggb9gh},\n\tabstract = {This article presents a resource analysis system for OCaml programs. The system automatically derives worst-case resource bounds for higher-order polymorphic programs with user-defined inductive types. The technique is parametric in the resource and can derive bounds for time, memory allocations and energy usage. The derived bounds are multivariate resource polynomials which are functions of different size parameters that depend on the standard OCaml types. Bound inference is fully automatic and reduced to a linear optimization problem that is passed to an off-the-shelf LP solver. Technically, the analysis system is based on a novel multivariate automatic amortized resource analysis (AARA). It builds on existing work on linear AARA for higher-order programs with user-defined inductive types and on multivariate AARA for first-order programs with built-in lists and binary trees. This is the first amortized analysis, that automatically derives polynomial bounds for higher-order functions and polynomial bounds that depend on user-defined inductive types. Moreover, the analysis handles a limited form of side effects and even outperforms the linear bound inference of previous systems. At the same time, it preserves the expressivity and efficiency of existing AARA techniques. The practicality of the analysis system is demonstrated with an implementation and integration with Inria's OCaml compiler. The implementation is used to automatically derive resource bounds for 411 functions and 6018 lines of code derived from OCaml libraries, the CompCert compiler, and implementations of textbook algorithms. In a case study, the system infers bounds on the number of queries that are sent by OCaml programs to DynamoDB, a commercial NoSQL cloud database service.},\n\turldate = {2019-11-01},\n\tbooktitle = {Proceedings of the 44th {ACM} {SIGPLAN} {Symposium} on {Principles} of {Programming} {Languages}},\n\tpublisher = {ACM},\n\tauthor = {Hoffmann, Jan and Das, Ankush and Weng, Shu-Chun},\n\tyear = {2017},\n\tnote = {ZSCC: 0000070 \nevent-place: Paris, France},\n\tkeywords = {Amortized Analysis, LP Solving, Resource Bound Analysis, Static Analysis, Type Inference, Type Systems},\n\tpages = {359--373}\n}\n\n","author_short":["Hoffmann, J.","Das, A.","Weng, S."],"key":"hoffmann_towards_2017","id":"hoffmann_towards_2017","bibbaseid":"hoffmann-das-weng-towardsautomaticresourceboundanalysisforocaml-2017","role":"author","urls":{"Paper":"http://doi.acm.org/10.1145/3009837.3009842"},"keyword":["Amortized Analysis","LP Solving","Resource Bound Analysis","Static Analysis","Type Inference","Type Systems"],"downloads":0},"bibtype":"inproceedings","biburl":"https://bibbase.org/zotero/k4rtik","creationDate":"2020-05-31T17:07:22.576Z","downloads":0,"keywords":["amortized analysis","lp solving","resource bound analysis","static analysis","type inference","type systems"],"search_terms":["towards","automatic","resource","bound","analysis","ocaml","hoffmann","das","weng"],"title":"Towards Automatic Resource Bound Analysis for OCaml","year":2017,"dataSources":["Z5Dp3qAJiMzxtvKMq"]}