|
ABSTRACT
In this paper a language-based approach to functionally correct imperative programming is proposed. The approach is based on a programming language called RSP1, which combines dependent types, general recursion, and imperative features in a type-safe way, while preserving decidability of type checking. The methodology used is that of internal verification, where programs manipulate programmer-supplied proofs explicitly as data. The fundamental technical idea of RSP1 is to identify problematic operations as impure, and keep them out of dependent types. The resulting language is powerful enough to verify statically non-trivial properties of imperative and functional programs. The paper presents the ideas through the examples of statically verified merge sort, statically verified imperative binary search trees, and statically verified directed acyclic graphs.
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
|
T. Altenkirch. Integrated verification in Type Theory. Lecture notes for a course at ESSLLI 96, Prague, 1996. available from the author's website.
|
| |
2
|
|
 |
3
|
|
| |
4
|
|
| |
5
|
J. Brandt. What a Mesh: Dependent Data Types for Correct Mesh Manipulation Algorithms. Master's thesis, Washington University in Saint Louis, 2005. In preparation.
|
 |
6
|
|
| |
7
|
R. L. Constable , S. F. Allen , H. M. Bromley , W. R. Cleaveland , J. F. Cremer , R. W. Harper , D. J. Howe , T. B. Knoblock , N. P. Mendler , P. Panangaden , J. T. Sasaki , S. F. Smith, Implementing mathematics with the Nuprl proof development system, Prentice-Hall, Inc., Upper Saddle River, NJ, 1986
|
| |
8
|
|
| |
9
|
G. Dowek, A. Felty, H. Herbelin, and G. Huet. The Coq proof assistant user's guide. Technical Report 154, Inria-Rocquencourt, France, 1993.
|
 |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
R. Klapper and A. Stump. Validated Proof-Producing Decision Procedures. In C. Tinelli and S. Ranise, editors, 2nd International Workshop on Pragmatics of Decision Procedures in Automated Reasoning, 2004.
|
 |
14
|
|
| |
15
|
Z. Luo and R. Pollack. LEGO Proof Development System: User's Manual. Technical Report ECS-LFCS-92--211, Edinburgh LFCS, 1992.
|
| |
16
|
|
| |
17
|
F. Mehta and T. Nipkow. Proving Pointer Programs in Higher-Order Logic. In F. Baader, editor, 19th International Conference on Automated Deduction, volume 2741 of LNCS, pages 121--135. Springer-Verlag, 2003.
|
 |
18
|
|
| |
19
|
B. Nordström, K. Petersson, and J. Smith. Programming in Martin-Löf's Type Theory. Oxford University Press, 1990.
|
| |
20
|
|
 |
21
|
|
| |
22
|
|
| |
23
|
|
 |
24
|
|
| |
25
|
R. Pollack. Dependently typed records in type theory. Formal Aspects of Computing, 13:386--402, 2002.
|
| |
26
|
|
 |
27
|
Mooly Sagiv , Thomas Reps , Reinhard Wilhelm, Parametric shape analysis via 3-valued logic, Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.105-118, January 20-22, 1999, San Antonio, Texas, United States
[doi> 10.1145/292540.292552]
|
| |
28
|
J. Sarnat. LF-Sigma: The Metatheory of LF with Sigma types. Technical Report 1268, Yale CS department, 2004.
|
| |
29
|
C. Schürmann and F. Pfenning. A Coverage Checking Algorithm for LF. In D. Basin and B. Wolff, editors, Proceedings of the 16th International Conference on Theorem Proving in Higher Order Logics, volume 2758 of LNCS, pages 120--135. Springer-Verlag, 2003.
|
| |
30
|
E. Westbrook, A. Stump, and I. Wehrman. A Language-based Approach to Functionally Correct Imperative Programming. Technical Report WUCSE-2005-32, Washington University in Saint Louis, July 2005.
|
| |
31
|
H. Xi. Facilitating Program Verification with Dependent Types. In Proceedings of the International Conference on Software Engineering and Formal Methods, pages 72--81, 2003.
|
| |
32
|
D. Zhu and H. Xi. Safe Programming with Pointers through Stateful Views. In Proceedings of the 7th International Symposium on Practical Aspects of Declarative Languages, pages 83--97, Long Beach, CA, January 2005. Springer-Verlag LNCS vol. 3350.
|
CITED BY 5
|
|
|
|
|
|
|
|
|
|
|
|
|
Gary T. Leavens , Jean-Raymond Abrial , Don Batory , Michael Butler , Alessandro Coglio , Kathi Fisler , Eric Hehner , Cliff Jones , Dale Miller , Simon Peyton-Jones , Murali Sitaraman , Douglas R. Smith , Aaron Stump, Roadmap for enhanced languages and methods to aid verification, Proceedings of the 5th international conference on Generative programming and component engineering, October 22-26, 2006, Portland, Oregon, USA
|
|