• No results found

Generic traversal over typed source code representations - Summary

N/A
N/A
Protected

Academic year: 2021

Share "Generic traversal over typed source code representations - Summary"

Copied!
3
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

UvA-DARE is a service provided by the library of the University of Amsterdam (https://dare.uva.nl)

UvA-DARE (Digital Academic Repository)

Generic traversal over typed source code representations

Visser, J.M.W.

Publication date

2003

Link to publication

Citation for published version (APA):

Visser, J. M. W. (2003). Generic traversal over typed source code representations.

General rights

It is not permitted to download or to forward/distribute the text or part of it without the consent of the author(s) and/or copyright holder(s), other than for strictly personal, individual use, unless the work is under an open content license (like Creative Commons).

Disclaimer/Complaints regulations

If you believe that digital publication of certain material infringes any of your rights or (privacy) interests, please let the Library know, stating your reasons. In case of a legitimate complaint, the Library will make the material inaccessible and/or remove it from the website. Please Ask the Library: https://uba.uva.nl/en/contact, or a letter to: Library of the University of Amsterdam, Secretariat, Singel 425, 1012 WP Amsterdam, The Netherlands. You will be contacted as soon as possible.

(2)

Summary y

Manyy areas of software engineering essentially involve analysis and transforma-tionn of source code representations. Generally, such representations are highly heterogenouss data structures. Examples are parse trees, abstract syntax trees, de-pendencyy graphs, and call graphs. Preferably, the well-formedness of such data structuress is guarded by strong static type systems.

Unfortunately,, when using traditional approaches, typeful programming is at oddss with conciseness, reusability, and robustness. Access to and traversal over subelementss of typed representations involves dealing with many specific types in specificc ways. As a consequence, type-safety comes at the cost of lengthy traver-sall code, which can not be reused in different parts of the representation or for differentlyy typed representations, and which breaks with any change in the repre-sentationn type.

Inn this thesis we present techniques to remedy the dilemma between type-safetyy on the one hand, and conciseness, reusability, and robustness on the other. Forr representative typed languages from the functional and object-oriented pro-grammingg paradigms, viz Haskell and Java, we developed programming idioms thatt allow program construction from combinators which support typeful generic

traversal.traversal. Using these combinators, program abstractions can be composed that

capturee e.g. reusable traversal strategies or analysis and transformation schemas. Thoughh typeful, these abstractions need make little or no commitment to the spe-cificc type structure of the representations to which they are applied.

Wee have developed tool support to enable the application of our generic traver-sall techniques to source code representations that involve large numbers of differ-entt subelement types. These tools generate combinator support from SDF gram-mars.. Parsers and pretty-printers can be generated from the same grammars, as welll as the necessary code for representing and exchanging syntax trees between parsers,, traversal components, and pretty-printers. In fact, SDF grammars are em-ployedd as contracts that govern all tree exchange, representation, and processing in aa general multi-lingual architecture for source code analysis and transformation.

Thee practical applicability of all these techniques has been put to the test in severall case studies, ranging from procedure reconstruction for Cobol programs, throughh static analysis of Toolbus scripts, to automated Java refactoring.

(3)

Referenties

GERELATEERDE DOCUMENTEN

While previous studies have attempted to equate the two tasks in a variety of ways, few have attempted to isolate structural differences by creating closely matched structural

In exploring the figure of the vampire within the Germanic tradition, two works separated not only by medium, but also by nearly a century of time, emerged as the focus of

Section 15 has claimed the lion's share of attention in academic commen- tary and popular debate, despite the fact that its practical impact on Canadian law has been

The stories and conversations shared throughout this chapter remind us of Freire‟s (1971) insights, that “the fundamental effort of education is to help with the liberation of

For the most part, the provision of child care was left to private and charitable social agencies and public services operated at the margins of welfare policy, where they have

Talking Circles within a British Columbian context would be of tremendous benefit to the provincial government as a public sector leader for Indigenous reconciliation and

The user has been heard and an appropriate text found and delivered (or possibly created) for the user. The other h alf of the exchange, where the listener becomes the speaker,

The THSZ is, therefore, coeval with (1) a series of latest Triassic – Early Jurassic shear and fault zones that characterize the length of the west margin of Stikinia; (2) the