|
ABSTRACT
We present a compositional program logic for call-by-value imperative higher-order functions with general forms of aliasing, which can arise from the use of reference names as function parameters, return values, content of references and parts of data structures. The program logic extends our earlier logic for alias-free imperative higher-order functions with new modal operators which serve as building blocks for clean structural reasoning about programs and data structures in the presence of aliasing. This has been an open issue since the pioneering work by Cartwright-Oppen and Morris twenty-five years ago. We illustrate usage of the logic for description and reasoning through concrete examples including a higher-order polymorphic Quicksort. The logical status of the new operators is clarified by translating them into (in)equalities of reference names. The logic is observationally complete in the sense that two programs are observationally indistinguishable if they satisfy the same set of assertions.
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
|
C- home page. http://www.cminusminus.org.
|
| |
2
|
A full version of the present paper. Available for download at www.dcs.qmul.ac.uk/~kohei/logics.
|
| |
3
|
|
 |
4
|
|
| |
5
|
Friedrich L. Bauer, Edsger W. Dijkstra, and Tony Hoare, editors. Theoretical Foundations of Programming Methodology, Lecture Notes of an International Summer School. Reidel, 1982.
|
| |
6
|
|
| |
7
|
|
| |
8
|
Cristiano Calcagno, Philippa Gardner, and Matthew Hague. From separation logic to first-order logic. In Proc. FoSSaCs'05, LNCS. Springer-Verlag.
|
 |
9
|
|
| |
10
|
Robert Cartwright and Derek C. Oppen. The logic of aliasing. Acta Inf., 15:365--384, 1981.
|
| |
11
|
Patrick Cousot. Methods and logics for proving programs. In Handbook of Theoretical Computer Science, volume B, pages 843--993. Elsevier, 1999.
|
| |
12
|
G. W. Kulczycki et al. Reasoning about procedure calls with repeated arguments and the reference-value distinction. Technical Report TR#02-13a, Dept. of Comp. Sci., Iowa State Univ., December 2003.
|
| |
13
|
Jean-Christophe Filliâtre and Nicolas Magaud. Certification of sorting algorithms in the system Coq. In Theorem Proving in Higher Order Logics: Emerging Trends, 1999.
|
| |
14
|
Robert W. Floyd. Assigning meaning to programs. In Symp. in Applied Mathematics, volume 19, 1967.
|
 |
15
|
|
 |
16
|
|
 |
17
|
Dan Grossman , Greg Morrisett , Trevor Jim , Michael Hicks , Yanling Wang , James Cheney, Region-based memory management in cyclone, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
| |
18
|
|
 |
19
|
|
 |
20
|
|
| |
21
|
Tony Hoare and He Jifeng. Unifying Theories of Programming. Prentice-Hall International, 1998.
|
 |
22
|
|
 |
23
|
|
| |
24
|
|
| |
25
|
|
| |
26
|
|
| |
27
|
Thomas Kleymann. Hoare logic and auxiliary variables. Technical report, University of Edinburgh, LFCS ECS-LFCS-98-399, October 1998.
|
| |
28
|
|
 |
29
|
|
| |
30
|
John L. McCarthy. Towards a mathematical science of computation. In IFIP Congress, pages 21--28, 1962.
|
| |
31
|
|
| |
32
|
|
| |
33
|
Joseph M. Morris. A general axiom of assignment/ assignment and linked data structures/ a proof of the Schorr-Wait algorithm. In {5}, pages 25--52. Reidel, 1982.
|
 |
34
|
|
| |
35
|
|
| |
36
|
|
| |
37
|
|
| |
38
|
Zhong Shao. An overview of the FLINT/ML compiler. In 1997 ACM SIGPLAN Workshop on Types in Compilation (TIC'97), Amsterdam, The Netherlands, June 1997.
|
| |
39
|
|
INDEX TERMS
Primary Classification:
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
F.3.1
Specifying and Verifying and Reasoning about Programs
Subjects:
Assertions
Additional Classification:
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
F.3.1
Specifying and Verifying and Reasoning about Programs
Subjects:
Logics of programs;
Specification techniques
General Terms:
Languages,
Reliability,
Security,
Theory,
Verification
Keywords:
π-calculus,
aliasing,
functional programming,
hoare-logics,
modalities,
pointers,
typing
|