TXL (programming language): Difference between revisions

Content deleted Content added
Blufox (talk | contribs)
No edit summary
Rescuing 2 sources and tagging 0 as dead.) #IABot (v2.0.8.8) (Ost316 - 10430
 
(21 intermediate revisions by 18 users not shown)
Line 3:
|logo =
|paradigm = [[Pattern-matching]] and [[Term-rewriting]]
|designer = [[Charles Halpern-Hamu]] and<br /> [[James Cordy]]
|developer = [[James Cordy]] <br /> Charles Halpern-Hamu]] and<br [[James/> Ian Carmichael <br /> Eric Promislow Cordy]]
}}
'''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)|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 programming|functional]] / [[rule-based programming|rule-based]] language using first order functional programming at the higher level and term rewriting at the lower level. The [[Semantics of programming languages|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) [[Backus–Naur form|BNF]]context-likefree [[grammar]] inusing context-freean ambiguous[[extended form,Backus–Naur Form]]; and a set of structural sourcetree 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 [[reengineering (software)|design recovery]], and in rapid prototyping of new [[programming languages]] and dialects.
 
TXL is most commonly used in software analysis and reengineering tasks such as [[reengineering (software)|design recovery]], and in rapid prototyping of new [[programming languages]] and dialects.
 
===Examples===
 
====BubbleSort[<ref>{{Cite web |url=http://star.itc.it/ricca/swat/SORT/Sort.Txl] |title=Archived copy |access-date=2008-03-19 |archive-date=2005-05-21 |archive-url=https://web.archive.org/web/20050521085457/http://star.itc.it/ricca/swat/SORT/Sort.Txl |url-status=dead }}</ref>===
%Syntax specification
define program
Line 33 ⟶ 34:
end rule
 
====Factorial<ref>{{Cite [web |url=http://star.itc.it/ricca/swatII/Esercizi/factorial.txl] |title=Archived copy |access-date=2008-03-19 |archive-date=2005-08-26 |archive-url=https://web.archive.org/web/20050826015927/http://star.itc.it/ricca/swatII/Esercizi/factorial.txl |url-status=dead }}</ref>===
%Syntax specification
define program
Line 66 ⟶ 67:
1
end function
 
== References ==
*[http://portal.acm.org/citation.cfm?id=114627.115074 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.]
*[http://portal.acm.org/citation.cfm?id=1149672 J.R. Cordy, 2006. The TXL Source Transformation Language. Science of Computer Programming 61,3 (August 2006), 190-210.]
 
== See also ==
* [[Turing (programming language)]]
* [[Refal | Refal (programming language)]]
* [[DMS Software Reengineering Toolkit]]
* [[Program transformation]]
 
== References ==
{{Reflist}}
*[http://portal.acm.org/citation.cfm?id=114627.115074 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.]
*[http://portal.acm.org/citation.cfm?id=1149672 J.R. Cordy, 2006. The TXL Source Transformation Language. Science of Computer Programming 61,3 (August 2006), 190-210.]
 
== External links ==
*[http://www.txl.ca/ TXL website]
 
[[Category:Programming languages]]
[[Category:Functional languages]]
[[Category:ProgrammingTransformation languages]]
[[Category:Term-rewriting programming languages]]