Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/800017.800526acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

The global storage needs of a subcomputation

Published: 15 January 1984 Publication History

Abstract

A defining characteristic of “functional” specifications is the absence of assignments: updates of tables and data structures are expressed by giving the relationship between the new and old values. An obvious implementation allocates separate space for new and old values and may consume a lot of storage. However, even when updates of attributes like symbol tables are expressed functionally, we would like to avoid making copies of the symbol table during attribute evaluation. In other words, if possible, the implementation should have a single global copy of the table that is updated using assignments. Since the value of the global copy changes during computation, the order of evaluation has to be chosen carefully. In this paper, we partition attributes into classes, the problem being to determine if there exists an evaluation order that allows each class to share a global storage area. The solution extends to handle symbol tables for block structured languages.
More precisely, consider a directed acyclic graph D in which vertices represent attribute values to be computed. Associated with each vertex is a label indicating the storage area to be shared by the vertex. Storage used during the evaluation of D is studied by playing a pebble game on D with the following steps: (1) pebble (i.e. place a pebble) on a source; (2) pebble a vertex if all its successors have pebbles (a pebble may be moved to the vertex from one of its successors); (3) pick up a pebble. Each vertex must be pebbled exactly once. The use of global storage is formalized by defining single pebblings, in which at most one of the vertices with a given label has a pebble at any time. The results also apply to a form of pebbling, called chain pebbling, that allows symbol tables for block structured languages to be studied.

References

[1]
A.V. Aho and J. D. Ullman, "Optimization of straight line programs," SIAM J. Computing1(1), pp. 1-19 (March 1972).
[2]
T.P. Baker, Personal communication, November 1983.
[3]
P.A. Bernstein, D. W. Shipman, and W. S. Wong, "Formal aspects of serializability in database concurrency control," IEEE Trans. Software EngineeringSE-5(3), pp. 203-216 (May 1979).
[4]
G.V. Bochman, "Semantic evaluation from left to right," Comm. ACM19(2), pp. 55-62 (February 1976).
[5]
J. Borowiec, "Pragmatics in a compiler production system," pp. 314-340 in Methods of Algorithmic Language Implementation, ed. A. Ershov and C. H. A. Koster, Lecture Notes in Computer Science 47, Springer-Verlag, Berlin (1977).
[6]
C.A. Brown and P. W. Purdom, Jr, Specifying one-pass bottom-up compilers, Computer Science Dept., Indiana Univ., Bloomington IN (July 1981).
[7]
R. Cohen and E. Harry, "Automatic generation of near-optimal linear-time translators for non-circular attribute grammars," Sixth Annual ACM Symposium on Principles of Programming Languages, San Antonio TX, pp. 121-134 (January 1979).
[8]
P. Cousot and R. Cousot, "Systematic design of program analysis frameworks," Sixth Annual ACM Symposium on Principles of Programming Languages, San Antonio TX, pp. 269-282 (January 1979).
[9]
R. Farrow, "Linguist-86: yet another translator writing system based on attribute grammars," SIGPLAN Notices17(6), pp. 160-171 (June 1982).
[10]
H. Ganzinger, "On storage optimization for automatically generated compilers," pp. 132-141 in Theoretical Computer Science, 4th GI Conference, Lecture Notes in Computer Science 67, Springer-Verlag, Berlin (1979).
[11]
H. Ganzinger, R. Giegerich, U. Möncke, and R. Wilhelm, "A truly generative semantics-directed compiler generator," SIGPLAN Notices17(6), pp. 172-184 (June 1982).
[12]
H. Ganzinger, K. Ripken, and R. Wilhelm, "MUG1 - An incremental compiler-compiler," ACM Annual Conference, pp. 415-418 (1976).
[13]
M. Jazayeri and D. Pozefsky, "Space-efficient storage management in an attribute grammar evaluator," ACM Transactions on Programming Languages and Systems3(4) (October 1981).
[14]
N.D. Jones and S. S. Muchnick, "A flexible approach to interprocedural data flow analysis and programs with recursive data structures," Ninth ACM Symposium on Principles of Programming Languages, pp. 66-74 (1982).
[15]
K. Kennedy and S. K. Warren, "Automatic generation of efficient evaluators for attribute grammars," Third ACM Symposium on Principles of Programming Languages, Atlanta GA, pp. 32-49 (January 1976).
[16]
K. Kennedy and J. Ramanathan, "A deterministic attribute grammar evaluator based on dynamic sequencing," ACM Transactions on Programming Languages and Systems1(1), pp. 142-160 (July 1979).
[17]
D. E. Knuth, "Semantics of context-free languages," Mathematical Systems Theory2(2), pp. 127-145 (1968). Errata 5(1), pp. 95-96 (1971).
[18]
K. Koskimies and K.-J. Räihä, "Modelling of space-efficient one-pass translation using attribute grammars," Software - Practice and Experience13, pp. 119-129 (1983).
[19]
J. Lewi, K. De Vlaminck, J. Huens, and M. Huybrechts, A Programming Methodology in Compiler Construction, Part 1: Concepts, North-Holland, Amsterdam (1979).
[20]
P.M. Lewis II, D. J. Rosenkrantz, and R. E. Stearns, "Attributed translations," J. Computer and System Sciences9, pp. 279-307 (1974).
[21]
B. Lorho, "Semantic attribute processing in the system Delta," pp. 21-40 in Methods of Algorithmic Language Implementation, ed. A. Ershov and C. H. A. Koster, Lecture Notes in Computer Science 47, Springer-Verlag, Berlin (1977).
[22]
O. L. Madsen, "On defining semantics by means of extended attribute grammars," pp. 259-299 in Semantics Directed Compiler Generation, ed. N. D. Jones, Lecture Notes in Computer Science 94, Springer-Verlag, Berlin (1980).
[23]
T. Marill, "Computational chains and the simplification of computer programs," IRE Trans. Electronic ComputersEC-11(2), pp. 173-180 (April 1962).
[24]
C.H. Papadimitriou, "The serializability of concurrent database updates," J. ACM26(4), pp. 631-653 (October 1979).
[25]
N. Pippenger, "Pebbling," Proc. Fifth IBM Symp. on Math. Foundations of Computer Science, pp. 1-19 (May 1980).
[26]
K.-J. Räihä, "On attribute grammars and their use in a compiler writing system," Report A-1977-4, Dept. of Computer Science, University of Helsinki (August 1977).
[27]
K.-J. Räihä, "A space management technique for multi-pass attribute evaluators," Report A-1981-4, Dept. of Computer Science, University of Helsinki (November 1981).
[28]
M. Saarinen, "On constructing efficient evaluators for attribute grammars," pp. 382-397 in Automata, Languages and Programming, Fifth Colloquium, Lecture Notes in Computer Science 62, Springer-Verlag, Berlin (1978).
[29]
D. Schmidt, "Detecting global variables in denotational specifications," manuscript, Computer Science Dept., Edinburgh Univ. (May 1983).
[30]
J. Schwarz, "Verifying the safe use of destructive updates in applicative programs," pp. 395-411 in Program Transformations, 3rd Intl. Symposium on Programming, ed. B. Robinet, Dunod, Paris (1978).
[31]
R. Sethi, "Complete register allocation problems," SIAM J. Computing4(3), pp. 226-248 (September 1975).
[32]
R. Sethi, "A model of concurrent database transactions," 22nd Annual Symposium on Foundations of Computer Science, Nashville TN, pp. 175-184 (October 1981).
[33]
R. Sethi, "Pebble games for studying storage sharing," Theoretical Computer Science19(1), pp. 69-84 (July 1982).
[34]
R.E. Stearns, P. M. Lewis II, and D. J. Rosenkrantz, "Concurrency control for database systems," pp. 19-32 in 17th Annual Symposium on Foundations of Computer Science, Houston Texas (October 1976).

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '84: Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
January 1984
302 pages
ISBN:0897911253
DOI:10.1145/800017
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 January 1984

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)39
  • Downloads (Last 6 weeks)10
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2005)Syntactic detection of single-threading using continuationsFunctional Programming Languages and Computer Architecture10.1007/3540543961_12(241-258)Online publication date: 6-Jul-2005
  • (2005)Path semanticsMathematical Foundations of Programming Language Semantics10.1007/3-540-19020-1_26(476-489)Online publication date: 26-May-2005
  • (2005)An implementation from a direct semantics definitionPrograms as Data Objects10.1007/3-540-16446-4_13(222-235)Online publication date: 29-May-2005
  • (1994)In-place updates in the presence of control operatorsACM SIGPLAN Lisp Pointers10.1145/182590.182491VII:3(283-293)Online publication date: 1-Jul-1994
  • (1994)In-place updates in the presence of control operatorsProceedings of the 1994 ACM conference on LISP and functional programming10.1145/182409.182491(283-293)Online publication date: 1-Jul-1994
  • (1992)Proving the correctness of storage representationsACM SIGPLAN Lisp Pointers10.1145/141478.141528V:1(151-160)Online publication date: 1-Jan-1992
  • (1992)Proving the correctness of storage representationsProceedings of the 1992 ACM conference on LISP and functional programming10.1145/141471.141528(151-160)Online publication date: 3-Jan-1992
  • (1989)On determining lifetime and aliasing of dynamically allocated data in higher-order functional specificationsProceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/96709.96725(157-168)Online publication date: 1-Dec-1989
  • (1987)Algorithm specification in a very high level languageProceedings of the 1987 Fall Joint Computer Conference on Exploring technology: today and tomorrow10.5555/42040.42053(73-79)Online publication date: 1-Dec-1987
  • (1986)Global storage allocation in attribute evaluationProceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages10.1145/512644.512647(26-37)Online publication date: 1-Jan-1986
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media