encyclopegia.org

TXL (programming language)

TXL is a special-purpose programming language originally designed by Charles Halpern-Hamu and James Cordy at the University of Toronto in 1985. The acronym "TXL" originally stood for "Turing eXtender Language" after the language's original purpose, the specification and rapid prototyping of variants and extensions of the Turing programming language, but no longer has any meaningful interpretation. Modern TXL is specifically designed for creating, manipulating and rapidly prototyping language-based descriptions, tools and applications using source transformation. It is a hybrid functional / rule-based language using first order functional programming at the higher level and term rewriting at the lower level. The formal semantics and implementation of TXL are based on formal term rewriting, but the term structures are largely hidden from the user due to the example-like style of pattern specification. Each TXL program has two components: a description of the source structures to be transformed, specified as a (possibly ambiguous) context-free grammar using an extended Backus–Naur Form; and a set of tree transformation rules, specified using pattern / replacement pairs combined using first order functional programming.…

TXL is a special-purpose programming language originally designed by Charles Halpern-Hamu and James Cordy at the University of Toronto in 1985. The acronym "TXL" originally stood for "Turing eXtender Language" after the language's original purpose, the specification and rapid prototyping of variants and extensions of the Turing programming language, but no longer has any meaningful interpretation. Modern TXL is specifically designed for creating, manipulating and rapidly prototyping language-based descriptions, tools and applications using source transformation. It is a hybrid functional / rule-based language using first order functional programming at the higher level and term rewriting at the lower level. The formal semantics and implementation of TXL are based on formal term rewriting, but the term structures are largely hidden from the user due to the example-like style of pattern specification. Each TXL program has two components: a description of the source structures to be transformed, specified as a (possibly ambiguous) context-free grammar using an extended Backus–Naur Form; and a set of tree transformation rules, specified using pattern / replacement pairs combined using first order functional programming. TXL is designed to allow explicit programmer control over the interpretation, application, order and backtracking of both parsing and rewriting rules, allowing for expression of a wide range of grammar-based techniques such as agile parsing. The first component parses the input expression into a tree using pattern-matching. The second component uses Term-rewriting in a manner similar to Yacc to produce the transformed output. TXL is most commonly used in software analysis and reengineering tasks such as design recovery, and in rapid prototyping of new programming languages and dialects. ==Examples== ===BubbleSort=== Source: %Syntax specification define program [repeat number] end define %Transformation rules rule main replace $ [repeat number] N1 [number] N2 [number] Rest [repeat number] where N1 [> N2] by N2 N1 Rest end rule ===Factorial=== Source: %Syntax specification define program [number] end define %Transformation rules function main replace [program] p [number] by p [fact][fact0] end function function fact replace [number] n [number] construct nMinusOne [number] n [- 1] where n [> 1] construct factMinusOne [number] nMinusOne [fact] by n [* factMinusOne] end function function fact0 replace [number] 0 by 1 end function J.R. Cordy, C.D. Halpern and E. Promislow, 1991. TXL: A Rapid Prototyping System for Programming Language Dialects. Computer Languages 16,1 (January 1991), 97-107. J.R. Cordy, 2006. The TXL Source Transformation Language. Science of Computer Programming 61,3 (August 2006), 190-210.

References

  1. Archived copy · retrieved 2008-03-18 · rev 1321534554
    Cite this reference

    MLA "Archived copy." 2008-03-18. https://web.archive.org/web/20050521085457/http://star.itc.it/ricca/swat/SORT/Sort.Txl. Accessed 24 November 2026.

    Chicago "Archived copy." 2008-03-18. https://web.archive.org/web/20050521085457/http://star.itc.it/ricca/swat/SORT/Sort.Txl.

    APA encyclopegia.org. (2008). Archived copy. Retrieved November 24, 2026, from https://web.archive.org/web/20050521085457/http://star.itc.it/ricca/swat/SORT/Sort.Txl

  2. Archived copy · retrieved 2008-03-18 · rev 1321534554
    Cite this reference

    MLA "Archived copy." 2008-03-18. https://web.archive.org/web/20050826015927/http://star.itc.it/ricca/swatII/Esercizi/factorial.txl. Accessed 24 November 2026.

    Chicago "Archived copy." 2008-03-18. https://web.archive.org/web/20050826015927/http://star.itc.it/ricca/swatII/Esercizi/factorial.txl.

    APA encyclopegia.org. (2008). Archived copy. Retrieved November 24, 2026, from https://web.archive.org/web/20050826015927/http://star.itc.it/ricca/swatII/Esercizi/factorial.txl

Cite this article

MLA

"TXL (programming language)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/txl-programming-language. Accessed 24 November 2026.

Chicago

"TXL (programming language)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/txl-programming-language.

APA

encyclopegia.org. (2025). TXL (programming language). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/txl-programming-language

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

official language

stub · references available

pan-Slavic language

stub · references available

Hawaiʻi Sign Language

stub · references available

Taiwanese Sign Language

stub · references available

Category:Programming languages

stub · references available

International Mother Language Day

stub · references available

polysynthetic language

stub · references available

Category:Films by country or language

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1321534554 · 0.5 · snapshot enwiki-001321534554

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.