Incremental analysis of real programming languages

A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR( k ) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran,...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation Design and Implementation, 1997-05, Vol.32 (5), p.31-43
Hauptverfasser: Wagner, Tim A., Graham, Susan L.
Format: Artikel
Sprache:eng
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 43
container_issue 5
container_start_page 31
container_title SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation
container_volume 32
creator Wagner, Tim A.
Graham, Susan L.
description A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR( k ) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran, which are inherently non-deterministic. Designers of batch compilers work around such limitations by combining generated components with ad hoc techniques (for instance, performing partial type and scope analysis in tandem with parsing). Unfortunately, the complexity of incremental systems precludes the use of batch solutions. The inability to generate incremental tools for important languages inhibits the widespread use of language-rich interactive environments.We address this problem by extending the language model itself, introducing a program representation based on parse dags that is suitable for both batch and incremental analysis. Ambiguities unresolved by one stage are retained in this representation until further stages can complete the analysis, even if the reaolution depends on further actions by the user. Representing ambiguity explicitly increases the number and variety of languages that can be analyzed incrementally using existing methods.To create this representation, we have developed an efficient incremental parser for general context-free grammars. Our algorithm combines Tomita's generalized LR parser with reuse of entire subtrees via state-matching. Disambiguation can occur statically, during or after parsing, or during semantic analysis (using existing incremental techniques); program errors that preclude disambiguation retsin multiple interpretations indefinitely. Our representation and analyses gain efficiency by exploiting the local nature of ambiguities: for the S PEC 95 C programs, the explicit representation of ambiguity requires only 0.5% additional space and less than 1% additional time during reconstruction.
doi_str_mv 10.1145/258916.258920
format Article
fullrecord <record><control><sourceid>proquest_cross</sourceid><recordid>TN_cdi_crossref_primary_10_1145_258916_258920</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>29407664</sourcerecordid><originalsourceid>FETCH-LOGICAL-c305t-e51a83440f3cc0ac3510d0ef5b703b8db40f159e7390b93755be382d05e06f413</originalsourceid><addsrcrecordid>eNotkEtrwzAQhEUf0CTtsXefenO6q5Vs6VhCH4FAL-1ZyMrauPiRSskh_74O7mlgZ1hmPiEeEdaISj9LbSwW64tIuBIL1NrkiAVciyUYW1q0UBY3YgFUyBxJwZ1YpvQDAATSLITcDiFyz8PRd5kffHdObcrGOos8HQ5xbKLv-3Zoss4Pzck3nO7Fbe27xA__uhLfb69fm4989_m-3bzs8kCgjzlr9IaUgppCAB9II-yBa12VQJXZV5OD2nJJFipLpdYVk5F70AxFrZBW4mn-O7X4PXE6ur5NgbupCI-n5KRV07ZCTcF8DoY4phS5dofY9j6eHYK7YHIzJjdjoj-961bG</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>29407664</pqid></control><display><type>article</type><title>Incremental analysis of real programming languages</title><source>ACM Digital Library</source><creator>Wagner, Tim A. ; Graham, Susan L.</creator><creatorcontrib>Wagner, Tim A. ; Graham, Susan L.</creatorcontrib><description>A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR( k ) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran, which are inherently non-deterministic. Designers of batch compilers work around such limitations by combining generated components with ad hoc techniques (for instance, performing partial type and scope analysis in tandem with parsing). Unfortunately, the complexity of incremental systems precludes the use of batch solutions. The inability to generate incremental tools for important languages inhibits the widespread use of language-rich interactive environments.We address this problem by extending the language model itself, introducing a program representation based on parse dags that is suitable for both batch and incremental analysis. Ambiguities unresolved by one stage are retained in this representation until further stages can complete the analysis, even if the reaolution depends on further actions by the user. Representing ambiguity explicitly increases the number and variety of languages that can be analyzed incrementally using existing methods.To create this representation, we have developed an efficient incremental parser for general context-free grammars. Our algorithm combines Tomita's generalized LR parser with reuse of entire subtrees via state-matching. Disambiguation can occur statically, during or after parsing, or during semantic analysis (using existing incremental techniques); program errors that preclude disambiguation retsin multiple interpretations indefinitely. Our representation and analyses gain efficiency by exploiting the local nature of ambiguities: for the S PEC 95 C programs, the explicit representation of ambiguity requires only 0.5% additional space and less than 1% additional time during reconstruction.</description><identifier>ISSN: 0362-1340</identifier><identifier>ISBN: 0897919076</identifier><identifier>ISBN: 9780897919074</identifier><identifier>EISSN: 1558-1160</identifier><identifier>DOI: 10.1145/258916.258920</identifier><language>eng</language><ispartof>SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation, 1997-05, Vol.32 (5), p.31-43</ispartof><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-c305t-e51a83440f3cc0ac3510d0ef5b703b8db40f159e7390b93755be382d05e06f413</citedby><cites>FETCH-LOGICAL-c305t-e51a83440f3cc0ac3510d0ef5b703b8db40f159e7390b93755be382d05e06f413</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>314,780,784,27922,27923</link.rule.ids></links><search><creatorcontrib>Wagner, Tim A.</creatorcontrib><creatorcontrib>Graham, Susan L.</creatorcontrib><title>Incremental analysis of real programming languages</title><title>SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation</title><description>A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR( k ) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran, which are inherently non-deterministic. Designers of batch compilers work around such limitations by combining generated components with ad hoc techniques (for instance, performing partial type and scope analysis in tandem with parsing). Unfortunately, the complexity of incremental systems precludes the use of batch solutions. The inability to generate incremental tools for important languages inhibits the widespread use of language-rich interactive environments.We address this problem by extending the language model itself, introducing a program representation based on parse dags that is suitable for both batch and incremental analysis. Ambiguities unresolved by one stage are retained in this representation until further stages can complete the analysis, even if the reaolution depends on further actions by the user. Representing ambiguity explicitly increases the number and variety of languages that can be analyzed incrementally using existing methods.To create this representation, we have developed an efficient incremental parser for general context-free grammars. Our algorithm combines Tomita's generalized LR parser with reuse of entire subtrees via state-matching. Disambiguation can occur statically, during or after parsing, or during semantic analysis (using existing incremental techniques); program errors that preclude disambiguation retsin multiple interpretations indefinitely. Our representation and analyses gain efficiency by exploiting the local nature of ambiguities: for the S PEC 95 C programs, the explicit representation of ambiguity requires only 0.5% additional space and less than 1% additional time during reconstruction.</description><issn>0362-1340</issn><issn>1558-1160</issn><isbn>0897919076</isbn><isbn>9780897919074</isbn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>1997</creationdate><recordtype>article</recordtype><recordid>eNotkEtrwzAQhEUf0CTtsXefenO6q5Vs6VhCH4FAL-1ZyMrauPiRSskh_74O7mlgZ1hmPiEeEdaISj9LbSwW64tIuBIL1NrkiAVciyUYW1q0UBY3YgFUyBxJwZ1YpvQDAATSLITcDiFyz8PRd5kffHdObcrGOos8HQ5xbKLv-3Zoss4Pzck3nO7Fbe27xA__uhLfb69fm4989_m-3bzs8kCgjzlr9IaUgppCAB9II-yBa12VQJXZV5OD2nJJFipLpdYVk5F70AxFrZBW4mn-O7X4PXE6ur5NgbupCI-n5KRV07ZCTcF8DoY4phS5dofY9j6eHYK7YHIzJjdjoj-961bG</recordid><startdate>19970501</startdate><enddate>19970501</enddate><creator>Wagner, Tim A.</creator><creator>Graham, Susan L.</creator><scope>AAYXX</scope><scope>CITATION</scope><scope>7SC</scope><scope>8FD</scope><scope>JQ2</scope><scope>L7M</scope><scope>L~C</scope><scope>L~D</scope></search><sort><creationdate>19970501</creationdate><title>Incremental analysis of real programming languages</title><author>Wagner, Tim A. ; Graham, Susan L.</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c305t-e51a83440f3cc0ac3510d0ef5b703b8db40f159e7390b93755be382d05e06f413</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>1997</creationdate><toplevel>online_resources</toplevel><creatorcontrib>Wagner, Tim A.</creatorcontrib><creatorcontrib>Graham, Susan L.</creatorcontrib><collection>CrossRef</collection><collection>Computer and Information Systems Abstracts</collection><collection>Technology Research Database</collection><collection>ProQuest Computer Science Collection</collection><collection>Advanced Technologies Database with Aerospace</collection><collection>Computer and Information Systems Abstracts – Academic</collection><collection>Computer and Information Systems Abstracts Professional</collection><jtitle>SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Wagner, Tim A.</au><au>Graham, Susan L.</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Incremental analysis of real programming languages</atitle><jtitle>SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation</jtitle><date>1997-05-01</date><risdate>1997</risdate><volume>32</volume><issue>5</issue><spage>31</spage><epage>43</epage><pages>31-43</pages><issn>0362-1340</issn><eissn>1558-1160</eissn><isbn>0897919076</isbn><isbn>9780897919074</isbn><abstract>A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR( k ) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran, which are inherently non-deterministic. Designers of batch compilers work around such limitations by combining generated components with ad hoc techniques (for instance, performing partial type and scope analysis in tandem with parsing). Unfortunately, the complexity of incremental systems precludes the use of batch solutions. The inability to generate incremental tools for important languages inhibits the widespread use of language-rich interactive environments.We address this problem by extending the language model itself, introducing a program representation based on parse dags that is suitable for both batch and incremental analysis. Ambiguities unresolved by one stage are retained in this representation until further stages can complete the analysis, even if the reaolution depends on further actions by the user. Representing ambiguity explicitly increases the number and variety of languages that can be analyzed incrementally using existing methods.To create this representation, we have developed an efficient incremental parser for general context-free grammars. Our algorithm combines Tomita's generalized LR parser with reuse of entire subtrees via state-matching. Disambiguation can occur statically, during or after parsing, or during semantic analysis (using existing incremental techniques); program errors that preclude disambiguation retsin multiple interpretations indefinitely. Our representation and analyses gain efficiency by exploiting the local nature of ambiguities: for the S PEC 95 C programs, the explicit representation of ambiguity requires only 0.5% additional space and less than 1% additional time during reconstruction.</abstract><doi>10.1145/258916.258920</doi><tpages>13</tpages><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier ISSN: 0362-1340
ispartof SIGPLAN 97: 10th Conference on Programming Language, Design and Implementation, 1997-05, Vol.32 (5), p.31-43
issn 0362-1340
1558-1160
language eng
recordid cdi_crossref_primary_10_1145_258916_258920
source ACM Digital Library
title Incremental analysis of real programming languages
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-09T21%3A25%3A31IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Incremental%20analysis%20of%20real%20programming%20languages&rft.jtitle=SIGPLAN%2097:%2010th%20Conference%20on%20Programming%20Language,%20Design%20and%20Implementation&rft.au=Wagner,%20Tim%20A.&rft.date=1997-05-01&rft.volume=32&rft.issue=5&rft.spage=31&rft.epage=43&rft.pages=31-43&rft.issn=0362-1340&rft.eissn=1558-1160&rft.isbn=0897919076&rft.isbn_list=9780897919074&rft_id=info:doi/10.1145/258916.258920&rft_dat=%3Cproquest_cross%3E29407664%3C/proquest_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=29407664&rft_id=info:pmid/&rfr_iscdi=true