|
ABSTRACT
We describe an axiomatic extension to the Coq proof assistant, that supports writing, reasoning about, and extracting higher-order, dependently-typed programs with side-effects. Coq already includes a powerful functional language that supports dependent types, but that language is limited to pure, total functions. The key contribution of our extension, which we call Ynot, is the added support for computations that may have effects such as non-termination, accessing a mutable store, and throwing/catching exceptions. The axioms of Ynot form a small trusted computing base which has been formally justified in our previous work on Hoare Type Theory (HTT). We show how these axioms can be combined with the powerful type and abstraction mechanisms of Coq to build higher-level reasoning mechanisms which in turn can be used to build realistic, verified software components. To substantiate this claim, we describe here a representative series of modules that implement imperative finite maps, including support for a higher-order (effectful) iterator. The implementations range from simple (e.g., association lists) to complex (e.g., hash tables) but share a common interface which abstracts the implementation details and ensures that the modules properly implement the finite map abstraction.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Ralph-Johan J. Back , Abo Akademi , J. Von Wright , F. B. Schneider , D. Gries, Refinement Calculus: A Systematic Introduction, Springer-Verlag New York, Inc., Secaucus, NJ, 1998
|
| |
2
|
M. Barnett, K. R. M. Leino, andW. Schulte. The Spec# programming system: An overview. In International Workshop on Construction and Analysis of Safe, Secure and Interoperable Smart Devices, CASSIS'04, volume 3362 of Lecture Notes in Computer Science. Springer, 2004.
|
| |
3
|
|
 |
4
|
|
| |
5
|
L. Birkedal and H. Yang. Relational parametricity and separation logic. In FOSSACS'07, volume 4423 of LNCS, 2007.
|
| |
6
|
S. Boulmé. Intuitionistic refinement calculus. In International Conference on Typed Lambda Calculus and Applications, TLCA'07, pages 54--69, 2007.
|
| |
7
|
Lilian Burdy , Yoonsik Cheon , David R. Cok , Michael D. Ernst , Joseph R. Kiniry , Gary T. Leavens , K. Rustan M. Leino , Erik Poll, An overview of JML tools and applications, International Journal on Software Tools for Technology Transfer (STTT), v.7 n.3, p.212-232, June 2005
[doi> 10.1007/s10009-004-0167-4]
|
| |
8
|
J. Condit, M. Harren, Z. Anderson, D. Gay, and G. Necula. Dependent types for low-level programming. In European Symposium on Programming, ESOP'07, volume 4421 of Lecture Notes in Computer Science, pages 520--535. Springer, 2007.
|
| |
9
|
L. Cruz-Filipe and P. Letouzey. A Large-Scale Experiment in Executing Extracted Programs. In Calculemus'05, 2005.
|
| |
10
|
D. L. Detlefs, K. R. M. Leino, G. Nelson, and J. B. Saxe. Extended static checking. Compaq Systems Research Center, Research Report 159, December 1998.
|
 |
11
|
|
 |
12
|
Xinyu Feng , Zhong Shao , Yuan Dong , Yu Guo, Certifying low-level programs with hardware interrupts and preemptive threads, Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation, June 07-13, 2008, Tucson, AZ, USA
|
| |
13
|
|
 |
14
|
|
 |
15
|
|
 |
16
|
|
| |
17
|
G. Gonthier. A computer-checked proof of the Four Colour Theorem. http://research.microsoft.com/~gonthier/4colproof.pdf, 2005.
|
| |
18
|
A. Hobor, A. W. Appel, and F. Z. Nardelli. Oracle semantics for concurrent separation logic. In European Symposium on Programming, ESOP'08, pages 353--367, 2008.
|
| |
19
|
P. V. Homeier and D. F. Martin. A mechanically verified verification condition generator. The Computer Journal, 38(2):131--141, 1995.
|
| |
20
|
|
| |
21
|
Trevor Jim , J. Greg Morrisett , Dan Grossman , Michael W. Hicks , James Cheney , Yanling Wang, Cyclone: A Safe Dialect of C, Proceedings of the General Track of the annual conference on USENIX Annual Technical Conference, p.275-288, June 10-15, 2002
|
| |
22
|
C. B. Jones. Some mistakes I have made and what I have learned from them. In Fundamental Approaches to Software Engineering, volume 1382 of Lecture Notes in Computer Science, pages 7--20. Springer-Verlag, 1998.
|
| |
23
|
|
| |
24
|
N. R. Krishnaswami, L. Birkedal, and J. Aldrich. Modular verification of the subject-observer pattern via higher-order separation logic. Presented at the FTFJP 2007 workshop, 2007.
|
 |
25
|
|
| |
26
|
K. R. M. Leino, G. Nelson, and J. B. Saxe. ESC/Java User's Manual. Compaq Systems Research Center, October 2000. Technical Note 2000-002.
|
 |
27
|
|
| |
28
|
P. Letouzey. A New Extraction for Coq. In H. Geuvers and F. Wiedijk, editors, Types for Proofs and Programs, Second International Workshop, TYPES 2002, Berg en Dal, The Netherlands, April 24-28, 2002, volume 2646 of Lecture Notes in Computer Science. Springer-Verlag, 2003.
|
| |
29
|
N. Marti and R. Affeldt. A certified verifier for a fragment of Separation logic. In JSSST Workshop on Programming and Programming Languages (PPL'07). Japan Society for Software Science and Technology, 2007.
|
| |
30
|
The Coq development team. The Coq proof assistant reference manual. LogiCal Project, 2004. Version 8.0.
|
| |
31
|
|
| |
32
|
A. Nanevski, A. Ahmed, G. Morrisett, and L. Birkedal. Abstract Predicates and Mutable ADTs in Hoare Type Theory. In European Symposium on Programming, ESOP'07, volume 4421 of Lecture Notes in Computer Science, pages 189--204. Springer, 2007.
|
 |
33
|
|
 |
34
|
|
 |
35
|
|
| |
36
|
|
 |
37
|
|
| |
38
|
R. L. Petersen, L. Birkedal, A. Nanevski, and G. Morrisett. A realizability model for impredicative Hoare Type Theory. In European Symposium on Programming, ESOP'08, 2008.
|
| |
39
|
V. Preoteasa. Mechanical verification of recursive procedures manipulating pointers using separation logic. In 14th International Symposium on Formal Methods, pages 508--523, August 2006.
|
 |
40
|
|
 |
41
|
|
 |
42
|
|
 |
43
|
|
 |
44
|
|
| |
45
|
|
 |
46
|
|
| |
47
|
T. Weber. Towards mechanized program verification with separation logic. In Proceedings of CSL'04, volume 3210 of LNCS, pages 250--264. Springer, 2004.
|
 |
48
|
|
| |
49
|
M. Wildmoser. Verified Proof Carrying Code. PhD thesis, Institut für Informatik, Technische Universität München, 2005.
|
| |
50
|
M. Wildmoser and T. Nipkow. Certifying machine code safety: Shallow versus deep embedding. In Applications of Higher Order Logic Theorem Proving, TPHOL'04, volume 3223 of Lecture Notes in Computer Science, pages 305--320, 2004..
|
| |
51
|
H. Xi. Applied Type System (extended abstract). In TYPES'03, pages 394--408. Springer-Verlag LNCS 3085, 2004.
|
 |
52
|
|
|