TXL (programming language)
Developer | James Cordy Charles Halpern-Hamu Ian Carmichael Eric Promislow |
---|---|
Website | www |
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
Each TXL program has two components: a description of the source structures to be transformed, specified as a (possibly ambiguous)
The first component parses the input expression into a tree using
TXL is most commonly used in software analysis and reengineering tasks such as
Examples
BubbleSort[1]
%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[2]
%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
See also
- Turing (programming language)
- Refal (programming language)
- DMS Software Reengineering Toolkit
- Program transformation
References
- ^ "Archived copy". Archived from the original on 2005-05-21. Retrieved 2008-03-19.
{{cite web}}
: CS1 maint: archived copy as title (link) - ^ "Archived copy". Archived from the original on 2005-08-26. Retrieved 2008-03-19.
{{cite web}}
: CS1 maint: archived copy as title (link)
- 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.