Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1111542.1111544acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
Article

Source transformation, analysis and generation in TXL

Published: 09 January 2006 Publication History
  • Get Citation Alerts
  • Abstract

    The TXL transformation framework has been widely used in practical source transformation tasks in industry and academia for many years. At the core of the framework is the TXL language, a functional programming language specifically designed for expressing source transformation tasks. TXL programs are self-contained, specifying and implementing all aspects of parsing, pattern matching, transformation rules, application strategies and unparsing in a single uniform notation with no dependence on other tools or technologies. Programs are directly interpreted by the TXL processor without any compile or build step, making it particularly well suited to rapid turnaround, test-driven development. In this paper we provide a practical introduction to using TXL in rapidly developing source transformations from concrete examples, and review experience in applying TXL to a number of practical large scale applications in source code analysis, renovation and migration.

    References

    [1]
    P. Anderson and M. Zarins, "The CodeSurfer Software Understanding Platform", Proc. IEEE 13th International Workshop on Program Comprehension, 147--148 (2005).]]
    [2]
    I. D. Baxter, "Design Maintenance Systems", Communications of the ACM35(4), 73--89 (1992).]]
    [3]
    K. Beck, Extreme Programming Explained: Embrace Change, 2nd Edition, Addison-Wesley (2004).]]
    [4]
    J. A. Bergstra, J. Heering and P. Klint, Algebraic Specification, ACM Press (1989).]]
    [5]
    M. van den Brand, A. van Deursen, J. Heering, H. A. de Jong, M. de Jonge, T. Kuipers, P. Klint, L. Moonen, P. A. Olivier, J. Scheerder, J. J. Vinju, E. Visser and J. Visser, "The ASF+SDF Meta-environment: A Component-Based Language Development Environment", Proc. Compiler Construction 2001, 365--370 (2001).]]
    [6]
    T. Cassidy, J. R. Cordy, T. Dean and J. Dingel, "Source Transformation for Concurrency Analysis", Proc. LDTA 2005, ACM 5th International Workshop on Language Descriptions, Tools and Applications, 26--43 (2005).]]
    [7]
    J. R. Cordy, "TXL - A Language for Programming Language Tools and Applications", Proc. LDTA 2004, ACM 4th International Workshop on Language Descriptions, Tools and Applications, Electronic Notes in Theoretical Computer Science110, 3--31 (2004).]]
    [8]
    J. R. Cordy, I. H. Carmichael and R. Halliday, The TXL Programming Language, Queen's University at Kingston (1988, rev. 2005).]]
    [9]
    J. R. Cordy and E. M. Promislow, "Specification and Automatic Prototype Implementation of Polymorphic Objects in Turing Using the TXL Dialect Processor", Proc. 1990 IEEE International Conference on Computer Languages, 145--154 (1990).]]
    [10]
    J. R. Cordy, C. D, Halpern and E. Promislow, "TXL: A Rapid Prototyping System for Programming Language Dialects", Computer Languages16(1), 97--107 (1991).]]
    [11]
    J. R. Cordy and M. Shukla, "Practical Metaprogramming", Proc. CASCON'92, IBM Center for Advanced Studies 1992 Conference, 215--224 (1992).]]
    [12]
    J. R. Cordy, T. R. Dean, A. J. Malton and K. A. Schneider, "Source Transformation in Software Engineering using the TXL Transformation System", Journal of Information and Software Technology44(13), 827--837 (2002).]]
    [13]
    J. R. Cordy, K. A. Schneider, T. R. Dean and A. J. Malton, "HSML: Design Directed Source Code Hot Spots", Proc. IEEE 9th International Workshop on Program Comprehension, 145--154 (2001).]]
    [14]
    T. R. Dean, J. R. Cordy, K. A. Schneider and A. J. Malton, "Experience Using Design Recovery Techniques to Transform Legacy Systems", Proc. 2001 IEEE International Conference on Software Maintenance, 622--631 (2001).]]
    [15]
    T. R. Dean, J. R. Cordy, A. J. Malton and K. A. Schneider, "Agile Parsing in TXL", Journal of Automated Software Engineering10(4), 311--336 (2003).]]
    [16]
    G. Gelernter, "Generative Communication in Linda", ACM Transactions on Programming Languages and Systems7(1), 80--112 (1985).]]
    [17]
    P. Godefroid, "On the Costs and Benefits of using Partial-Order Methods for the Verification of Concurrent Systems", Proc. DIMACS Workshop on Partial-Order Methods in Verification (1996).]]
    [18]
    X. Guo, J. R. Cordy and T. R. Dean, "Unique Renaming of Java Using Source Transformation", Proc. SCAM 2003, IEEE 3rd International Workshop on Source Code Analysis and Manipulation, 151--160 (2003).]]
    [19]
    C. Halpern, "TXL: A Rapid Prototyping Tool for Programming Language Design", M.Sc. thesis, Department of Computer Science, University of Toronto (1986).]]
    [20]
    R. C. Holt and J. R. Cordy, "The Turing Programming Language", Communications of the ACM31(12), 1410--1423 (1988).]]
    [21]
    N. Kiyavitskaya, N. Zeni, J. R. Cordy, L. Mich and J. Mylopoulos, "Applying Software Analysis Technology to Lightweight Semantic Markup of Document Text", Proc. ICAPR 2005, 3rd International Conference on Advances in Pattern Recognition, Lecture Notes in Computter Science3686, 590--600 (2005).]]
    [22]
    D. A. Lamb and K. A. Schneider. "Formalization of Information Hiding Design Methods", Proc. CASCON '92, IBM Center for Advanced Studies 1992 Conference, 201--214 (1992).]]
    [23]
    A. J. Malton, "The Denotational Semantics of a Functional Tree Manipulation Language", Computer Languages19(3), 157--168 (1993).]]
    [24]
    T. J. Parr and R. W. Quong, "ANTLR: A Predicated LL(k) Parser Generator," Software, Practice and Experience25(7), 789--810 (1995).]]
    [25]
    R. Paige, "Viewing a Program Transformation System at Work", Proc. 6th International Conference on Programming Language Implementation and Logic Programming, Lecture Notes in Computer Science844, 5--24 (1991).]]
    [26]
    R. Paige, "APTS External Specification Manual", Unpublished manuscript, available at http://www.cs.nyu.edu/jessie (1993).]]
    [27]
    R. Ramesh and I. V. Ramakrishnan, "Nonlinear Pattern Matching in Trees", Journal of the ACM39(2): 295--316 (1992).]]
    [28]
    O. Tal, S. Knight, and T. Dean, "Syntax-based Vulnerability Testing of Frame-based Network Protocols", Proc. 2nd Annual Conference on Privacy, Security and Trust (2004).]]
    [29]
    M. Tomita, "An Efficient Augmented Context-free Parsing Algorithm", Computational Linguistics13(1--2), 31--46 (1987).]]
    [30]
    E. Visser, "Stratego: A Language for Program Transformation based on Rewriting Strategies", Proc. Rewriting Techniques and Applications (RTA'01), Lecture Notes in Computer Science2051, 357--361 (2001).]]
    [31]
    E. Visser, "Program Transformation in Stratego/XT: Rules, Strategies, Tools and Systems in Stratego XT/0.9", Proc. Domain Specific Program Generation 2003, Lecture Notes in Computer Science3016, 216--238 (2004).]]
    [32]
    R. Zanibbi, D. Blostein and J. R. Cordy, "Recognizing Mathematical Expressions Using Tree Transformation", IEEE Transactions on Pattern Analysis and Machine Intelligence24(11), 1455--1467 (2002).]]

    Cited By

    View all
    • (2022)DevReplay: Linter that generates regular expressions for repeating code changesScience of Computer Programming10.1016/j.scico.2022.102857223(102857)Online publication date: Nov-2022
    • (2020)SemanticCloneBench: A Semantic Code Clone Benchmark using Crowd-Source Knowledge2020 IEEE 14th International Workshop on Software Clones (IWSC)10.1109/IWSC50091.2020.9047643(57-63)Online publication date: Feb-2020
    • (2019)Combining static and dynamic analysis to guide PGO for HPC applications: a case study on real-world applications2019 International Conference on High Performance Computing & Simulation (HPCS)10.1109/HPCS48598.2019.9188161(513-520)Online publication date: Jul-2019
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PEPM '06: Proceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
    January 2006
    176 pages
    ISBN:1595931961
    DOI:10.1145/1111542
    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: 09 January 2006

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. TXL
    2. migration
    3. rapid prototyping
    4. re-engineering
    5. rule-based programming
    6. software analysis
    7. source transformation
    8. term rewriting
    9. test-driven development
    10. translators

    Qualifiers

    • Article

    Conference

    PEPM06
    Sponsor:
    PEPM06: Partial Evaluation and Program Manipulation 2006
    January 9 - 10, 2006
    South Carolina, Charleston

    Acceptance Rates

    Overall Acceptance Rate 66 of 120 submissions, 55%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)0

    Other Metrics

    Citations

    Cited By

    View all
    • (2022)DevReplay: Linter that generates regular expressions for repeating code changesScience of Computer Programming10.1016/j.scico.2022.102857223(102857)Online publication date: Nov-2022
    • (2020)SemanticCloneBench: A Semantic Code Clone Benchmark using Crowd-Source Knowledge2020 IEEE 14th International Workshop on Software Clones (IWSC)10.1109/IWSC50091.2020.9047643(57-63)Online publication date: Feb-2020
    • (2019)Combining static and dynamic analysis to guide PGO for HPC applications: a case study on real-world applications2019 International Conference on High Performance Computing & Simulation (HPCS)10.1109/HPCS48598.2019.9188161(513-520)Online publication date: Jul-2019
    • (2019)ASSIST: An FDO Source-to-Source Transformation Tool for HPC ApplicationsTools for High Performance Computing 201710.1007/978-3-030-11987-4_3(39-56)Online publication date: 15-Feb-2019
    • (2015)A type-safe embedding of SQL into Java using the extensible compiler framework J%Computer Languages, Systems and Structures10.1016/j.cl.2015.01.00141:C(1-20)Online publication date: 1-Apr-2015
    • (2014)Automatically Fixing C Buffer Overflows Using Program TransformationsProceedings of the 2014 44th Annual IEEE/IFIP International Conference on Dependable Systems and Networks10.1109/DSN.2014.25(124-135)Online publication date: 23-Jun-2014
    • (2013)Fix-it: An extensible code auto-fix component in Review Bot2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM.2013.6648198(167-172)Online publication date: Sep-2013
    • (2013)Near-miss clone patterns in web applications: An empirical study with industrial systems2013 26th IEEE Canadian Conference on Electrical and Computer Engineering (CCECE)10.1109/CCECE.2013.6567821(1-6)Online publication date: May-2013
    • (2012)Let's make refactoring tools user-extensible!Proceedings of the Fifth Workshop on Refactoring Tools10.1145/2328876.2328881(32-39)Online publication date: 1-Jun-2012
    • (2011)Automated translation of Java source code to EiffelProceedings of the 49th international conference on Objects, models, components, patterns10.5555/2025896.2025900(20-35)Online publication date: 28-Jun-2011
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media