[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/263699.263706acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

Shape types

Published: 01 January 1997 Publication History

Abstract

Type systems currently available for imperative languages are too weak to detect a significant class of programming errors. For example, they cannot express the property that a list is doubly-linked or circular. We propose a solution to this problem based on a notion of shape types defined as context-free graph grammars. We define graphs in set-theoretic terms, and graph modifications as multiset rewrite rules. These rules can be checked statically to ensure that they preserve the structure of the graph specified by the grammar. We provide a syntax for a smooth integration of shape types in C. The programmer can still express pointer manipulations with the expected constant time execution and benefits from the additional guarantee that the property specified by the shape type is an invariant of the program.

References

[1]
L. Andersen, Program analysis and specialization .for the C programming language, Ph.D Thesis, DIKU, University of Copenhagen, May 1994.
[2]
J.-P. Banhtre and D. Le M#tayer, Programming by multiset transformation, Communications of the ACM, Vol. 36-1, pp. 98-111, January 1993.
[3]
D. Chase, M. Wegman and F. Zadeck, Analysis of pointers and structures, in Proc. ACM Conf. on Protramming Language Design and Implementation, Vol. 25(6) of SIGPLAN Notices, pp. 296-310, 1990.
[4]
T. H. Cormen, C. E. Leiserson and R. L. Rivest, Introduction to algorithms, MIT Press, 1990.
[5]
B. Courcelle, Graph rewriting: an algebraic and logic approach, Handbook of Theoretical Computer Science, Chapter 5, J. van Leeuwen (ed.), Elsevier Science Publishers, 1990.
[6]
P. Della Vigna and C. Ghezzi, Context-free graph grammars, Information and Control, Vol. 37, pp. 207- 233, 1978.
[7]
A. Deutsch, Semantic models and abstract interpretation techniques for inductive data structures and pointers, in Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation PEPM'95, pp. 226-229, 1995.
[8]
P. Fradet and D. Le MStayer, Structured Gamma, Irisa Research Report PI-989, March 1996.
[9]
P. Fradet, R. Gaugne and D. Le M6tayer, Detection of pointer errors: an aaviomatisation and a checking algorithm, Proc. European Symposium on Programming, Springer Verlag, LNCS 1058, pp. 125-140, 1996.
[10]
R. Ghiya and L. J. Hendren, Is it a tree, a dag, or a cyclic graph ? A shape analysis for heap.directed pointers in G, in Proc. ACM Principles of Programming Languages, pp. 1-15, 1996.
[11]
J. Grosch, Tool support.for data structures, Structured Programming, Vol. 12, pp. 31-38, 1991.
[12]
L. J. Hendren, J. Hummel and A. Nicolau, Abstractions .for recursive pointer data structures: improving the analysis and transformation of imperative pro. grams, in Proc. ACM Conf. on Programming Language Design and Implementation, pp. 249-260, 1992.
[13]
J. Hummel, L. J. Hendren and A. Nicolau, Abstract description of pointer data structures: an approach }or improving the analysis and optimisation of imperative programs, ACM Letters on Programming Languages and Systems, Vol. 1, No 3, pp. 243-260, September 1992.
[14]
N. Jones and S. Muchnick, Flow analysis and optimization of Lisp-like structures, in Program Flow Analysis: Theory and Applications, New Jersey 1981, Prentice-Hall, pp. 102-131.
[15]
N. Klarlund and M. Schwartzbach, Graph types, Proc. ACM Principles of Programming Languages, pp. 196- 205, 1993.
[16]
N. Klarlund and M. Schwartzbach, Graphs and decidable transductions based on edge constraints, in Proc. Trees in Algebra and Progrnmming - CAAP'94, Springer Verlag, LNCS 787, pp. 187-201, 1994.
[17]
W. Landi and B. Ryder, Pointer induced aliasing, a problem classification, Proe. ACM Principles of Programming Languages, pp. 93-103, 1991.
[18]
W. Pugh, Skip lists: a probabilistic alternative to balanced trees, Communications of the ACM, Vol. 33-6, pp. 668-676, June 1990.
[19]
J.-C. Raoult and F. Voisin, Set-theoretic graph rewriting, Proc. int. Workshop on Graph T#'ansformations in Computer Science, Springer Verlag, LNCS 776, pp. 312-325, 1993.
[20]
J. R. Russel, R. E. Storm and D. M. Yellin, A checkable interlace language for pointer-based structures, Proc. Workshop on Interface Declaration Languages, ACM Sigplan Notices, Vol. 29, No. 8, August 1994.
[21]
M. Sagiv, T. Reps and R. Wilhelm, Solving shapeanalysis problems in languages with destructive updating, Proc. ACM Principles of Programming Languages, pp. 16-31, 1996.
[22]
R. Sedgewick, Algorithms in C, Addison-Wesley publishing company, 1990.
[23]
J. H. Siekmann, Unification theory, Advances in Artificial Intelligence, Ii, Elsevier Science Publishers, pp. 365-400, 1987.

Cited By

View all
  • (2024)Grammar-based Pattern Matching and Type Checking for Difference Data StructuresProceedings of the 26th International Symposium on Principles and Practice of Declarative Programming10.1145/3678232.3678243(1-13)Online publication date: 9-Sep-2024
  • (2023)Type Checking Data Structures More Complex than TreesJournal of Information Processing10.2197/ipsjjip.31.11231(112-130)Online publication date: 2023
  • (2022)Engineering Grammar-Based Type Checking for Graph Rewriting LanguagesIEEE Access10.1109/ACCESS.2022.321791310(114612-114628)Online publication date: 2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '97: Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 1997
497 pages
ISBN:0897918533
DOI:10.1145/263699
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: 01 January 1997

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

POPL97
Sponsor:
  • SIGPLAN
  • Ctr Natl de la Recherche Sci
  • L'Ecole des Mines de Paris
  • SIGACT

Acceptance Rates

POPL '97 Paper Acceptance Rate 36 of 225 submissions, 16%;
Overall Acceptance Rate 860 of 4,328 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)145
  • Downloads (Last 6 weeks)18
Reflects downloads up to 18 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Grammar-based Pattern Matching and Type Checking for Difference Data StructuresProceedings of the 26th International Symposium on Principles and Practice of Declarative Programming10.1145/3678232.3678243(1-13)Online publication date: 9-Sep-2024
  • (2023)Type Checking Data Structures More Complex than TreesJournal of Information Processing10.2197/ipsjjip.31.11231(112-130)Online publication date: 2023
  • (2022)Engineering Grammar-Based Type Checking for Graph Rewriting LanguagesIEEE Access10.1109/ACCESS.2022.321791310(114612-114628)Online publication date: 2022
  • (2022)A contextual multi-task neural approach to medication and adverse events identification from clinical textJournal of Biomedical Informatics10.1016/j.jbi.2021.103960125:COnline publication date: 1-Jan-2022
  • (2022)Disease evolution and risk-based disease trajectories in congestive heart failure patientsJournal of Biomedical Informatics10.1016/j.jbi.2021.103949125:COnline publication date: 1-Jan-2022
  • (2020)Unsupervised Detection of Distinctive Regions on 3D ShapesACM Transactions on Graphics10.1145/336678539:5(1-14)Online publication date: 31-May-2020
  • (2019)VISEJournal on Computing and Cultural Heritage 10.1145/334093612:4(1-9)Online publication date: 6-Dec-2019
  • (2019)Development of an Augmented Reality Tour Guide for a Cultural Heritage SiteJournal on Computing and Cultural Heritage 10.1145/331755212:4(1-24)Online publication date: 17-Nov-2019
  • (2017)Current State of Text Sentiment Analysis from Opinion to Emotion MiningACM Computing Surveys10.1145/305727050:2(1-33)Online publication date: 25-May-2017
  • (2014)Auto-parallelization of data structure operations for GPUsProceedings of the 2014 International Conference on Compilers, Architecture and Synthesis for Embedded Systems10.1145/2656106.2656115(1-10)Online publication date: 12-Oct-2014
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media