Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies
{"title":"推断高阶程序的累积效应","authors":"Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies","doi":"arxiv-2408.02791","DOIUrl":null,"url":null,"abstract":"Many temporal safety properties of higher-order programs go beyond simple\nevent sequencing and require an automaton register (or \"accumulator\") to\nexpress, such as input-dependency, event summation, resource usage, ensuring\nequal event magnitude, computation cost, etc. Some steps have been made towards\nverifying more basic temporal event sequences via reductions to fair\ntermination [Murase et al. 2016] or some input-dependent properties through\ndeductive proof systems [Nanjo et al. 2018]. However, there are currently no\nautomated techniques to verify the more general class of register-automaton\nsafety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,\nregister-automata effects of recursive, higher-order programs. We capture\nproperties of a program's effects in terms of automata that summarizes the\nhistory of observed effects using an accumulator register. The key novelty is a\nnew abstract domain for context-dependent effects, capable of abstracting\nrelations between the program environment, the automaton control state, and the\naccumulator value. The upshot is a dataflow type and effect system that\ncomputes context-sensitive effect summaries. We demonstrate our work via a\nprototype implementation that computes dependent effect summaries (and\nvalidates assertions) for OCaml-like recursive higher order programs. As a\nbasis of comparison, we describe reductions to assertion checking for\neffect-free programs, and demonstrate that our approach outperforms prior tools\nDrift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat\ncould not verify any, Drift verified 9 benchmarks, and evDrift verified 19;\nevDrift also had a 30.5x over Drift on those benchmarks that both tools could\nsolve.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"99 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Inferring Accumulative Effects of Higher Order Programs\",\"authors\":\"Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies\",\"doi\":\"arxiv-2408.02791\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Many temporal safety properties of higher-order programs go beyond simple\\nevent sequencing and require an automaton register (or \\\"accumulator\\\") to\\nexpress, such as input-dependency, event summation, resource usage, ensuring\\nequal event magnitude, computation cost, etc. Some steps have been made towards\\nverifying more basic temporal event sequences via reductions to fair\\ntermination [Murase et al. 2016] or some input-dependent properties through\\ndeductive proof systems [Nanjo et al. 2018]. However, there are currently no\\nautomated techniques to verify the more general class of register-automaton\\nsafety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,\\nregister-automata effects of recursive, higher-order programs. We capture\\nproperties of a program's effects in terms of automata that summarizes the\\nhistory of observed effects using an accumulator register. The key novelty is a\\nnew abstract domain for context-dependent effects, capable of abstracting\\nrelations between the program environment, the automaton control state, and the\\naccumulator value. The upshot is a dataflow type and effect system that\\ncomputes context-sensitive effect summaries. We demonstrate our work via a\\nprototype implementation that computes dependent effect summaries (and\\nvalidates assertions) for OCaml-like recursive higher order programs. As a\\nbasis of comparison, we describe reductions to assertion checking for\\neffect-free programs, and demonstrate that our approach outperforms prior tools\\nDrift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat\\ncould not verify any, Drift verified 9 benchmarks, and evDrift verified 19;\\nevDrift also had a 30.5x over Drift on those benchmarks that both tools could\\nsolve.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":\"99 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.02791\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.02791","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Inferring Accumulative Effects of Higher Order Programs
Many temporal safety properties of higher-order programs go beyond simple
event sequencing and require an automaton register (or "accumulator") to
express, such as input-dependency, event summation, resource usage, ensuring
equal event magnitude, computation cost, etc. Some steps have been made towards
verifying more basic temporal event sequences via reductions to fair
termination [Murase et al. 2016] or some input-dependent properties through
deductive proof systems [Nanjo et al. 2018]. However, there are currently no
automated techniques to verify the more general class of register-automaton
safety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,
register-automata effects of recursive, higher-order programs. We capture
properties of a program's effects in terms of automata that summarizes the
history of observed effects using an accumulator register. The key novelty is a
new abstract domain for context-dependent effects, capable of abstracting
relations between the program environment, the automaton control state, and the
accumulator value. The upshot is a dataflow type and effect system that
computes context-sensitive effect summaries. We demonstrate our work via a
prototype implementation that computes dependent effect summaries (and
validates assertions) for OCaml-like recursive higher order programs. As a
basis of comparison, we describe reductions to assertion checking for
effect-free programs, and demonstrate that our approach outperforms prior tools
Drift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat
could not verify any, Drift verified 9 benchmarks, and evDrift verified 19;
evDrift also had a 30.5x over Drift on those benchmarks that both tools could
solve.