| Copy-on-write in the PHP language |
| Full text |
Pdf
(586 KB)
|
Source
|
Annual Symposium on Principles of Programming Languages
archive
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
table of contents
Savannah, GA, USA
SESSION: Medley II
table of contents
Pages 200-212
Year of Publication: 2009
ISBN:978-1-60558-379-2
Also published in ...
|
|
Authors
|
|
Akihiko Tozawa
|
IBM Research, Tokyo Research Laboratory, Tokyo, Japan
|
|
Michiaki Tatsubori
|
IBM Research, Tokyo Research Laboratory, Tokyo, Japan
|
|
Tamiya Onodera
|
IBM Research, Tokyo Research Laboratory, Tokyo, Japan
|
|
Yasuhiko Minamide
|
University of Tsukuba, Tsukuba, Japan
|
|
| Sponsors |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 41, Downloads (12 Months): 196, Citation Count: 1
|
|
|
ABSTRACT
PHP is a popular language for server-side applications. In PHP, assignment to variables copies the assigned values, according to its so-called copy-on-assignment semantics. In contrast, a typical PHP implementation uses a copy-on-write scheme to reduce the copy overhead by delaying copies as much as possible. This leads us to ask if the semantics and implementation of PHP coincide, and actually this is not the case in the presence of sharings within values. In this paper, we describe the copy-on-assignment semantics with three possible strategies to copy values containing sharings. The current PHP implementation has inconsistencies with these semantics, caused by its naïve use of copy-on-write. We fix this problem by the novel mostly copy-on-write scheme, making the copy-on-write implementations faithful to the semantics. We prove that our copy-on-write implementations are correct, using bisimulation with the copy-on-assignment semantics.
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
|
|
 |
2
|
|
| |
3
|
H. P. Barendregt, M. C. J. D. Eekelen, J. R. W. Glauert, J. R. Kennaway, M. J. Plasmeijer, and M. R. Sleep. Term graph reduction. In Volume II: Parallel Languages on PARLE: Parallel Architectures and Languages Europe, pages 141--158, 1987.
|
| |
4
|
E. Barendsen and S. Smetsers. Graph rewriting and copying. Technical Report 92-20, University of Nijmegen, 1992.
|
 |
5
|
|
 |
6
|
|
 |
7
|
|
| |
8
|
|
 |
9
|
|
 |
10
|
|
 |
11
|
|
| |
12
|
|
 |
13
|
|
| |
14
|
J. T. Schwartz. Optimization of very high level languages, parts I, II. Comput. Lang., 1(2-3):161--218, 1975.
|
| |
15
|
|
 |
16
|
David N. Turner , Philip Wadler , Christian Mossin, Once upon a type, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.1-11, June 26-28, 1995, La Jolla, California, United States
[doi> 10.1145/224164.224168]
|
| |
17
|
P. Wadler. Linear types can change the world! In IFIP TC 2 Working Conference on Programming Concepts and Methods, pages 347--359, 1990.
|
|