A type system for extracting functional specifications from memory-safe imperative programs

Paul He,Eddy Westbrook, Brent Carmer, Chris Phifer,Valentin Robert, Karl Smeltzer,Andrei Stefanescu,Aaron Tomb, Adam Wick, Matthew Yacavone,Steve Zdancewic

Proceedings of the ACM on Programming Languages(2021)

引用 3|浏览28
暂无评分
摘要
AbstractVerifying imperative programs is hard. A key difficulty is that the specification of what an imperative program does is often intertwined with details about pointers and imperative state. Although there are a number of powerful separation logics that allow the details of imperative state to be captured and managed, these details are complicated and reasoning about them requires significant time and expertise. In this paper, we take a different approach: a memory-safe type system that, as part of type-checking, extracts functional specifications from imperative programs. This disentangles imperative state, which is handled by the type system, from functional specifications, which can be verified without reference to pointers. A key difficulty is that sometimes memory safety depends crucially on the functional specification of a program; e.g., an array index is only memory-safe if the index is in bounds. To handle this case, our specification extraction inserts dynamic checks into the specification. Verification then requires the additional proof that none of these checks fail. However, these checks are in a purely functional language, and so this proof also requires no reasoning about pointers.
更多
查看译文
关键词
Specification extraction, type systems, pointers, memory safety
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要