Learning TXL

The Guided Tour
A Practical Introduction
The TXL Challenge


Home

About TXL

Learn

Download

Resources

Documentation

Support


 

  Learning TXL
TXL is a weird and wonderful language, with a new, rich and distinctly different programming paradigm. Once you get your mind around it, it can help you very rapidly achieve real magic. But because it is different, it takes some time to understand. Along the way you will probably mistake it several times for things it isn't (for example, Haskell, Awk, Yacc or XSL/T).

If you have some experience in pure functional and logic programming, you have a step up, and it won't take you long to get started. If you don't have experience in pure functional programming, it'll take some time to learn TXL. In any case, the more experience you gain with TXL, the more effective you will be in using it.

  The Guided Tour
One way to begin learning TXL is to take the guided tour, a short journey through the basic features of the TXL language. The tour introduces basic concepts such as token and grammar specification, rules, functions, patterns, replacements, variables and parameters, and prepares you to enter the world of TXL.

The Guided Tour of TXL
A short online
web tour of the basic features of the TXL Programming Language.

  A Practical Introduction
If you're anxious to get started and learn as you go, a more go-to-it point of view may suit your taste. ("Just the facts, Ma'am.") If so, the practical introduction to TXL is for you.

A Practical Introduction to TXL
A slide show presentation by Jim Cordy of Queen's University from
TXL Day 2001 that introduces the basics of practical TXL programming for software analysis and transformation tasks in a "quick start" hands-on way.

If you're an expert in programming language processors, transformation systems or parsers, you may want to follow the practical introduction up with these detailed continuations.

Working with Grammars
A slide show presentation by Andrew Malton of the University of Waterloo from
TXL Day 2001 on the practice of crafting and working with structured grammars in TXL.

Transformation Paradigms
A slide show presentation by Tom Dean of Queen's University from
TXL Day 2001 on paradigms for transforming across languages using TXL.

  The TXL Challenge
The TXL Challenge is a structured sequence of four simple transformation problems specifically designed to quickly introduce you to the TXL paradigm. It is recommended that all new users attempt the challenge before trying to code their own solutions in TXL. It has helped scores of new users to learn the "ropes" of TXL in the past, and it's a quick and painless way to speed over the "learning curve" for this weird and wonderful language.

How it works: You are given a TXL grammar for the programming language Turing, which you (intentionally) probably do not know (but it looks kind of like Pascal, so it is probably familiar).

You are presented with a series of four problems in transforming Turing programs. For each problem, you are asked to:

  • Program a Solution in TXL
  • Test Your Solution on a Given Set of Input Data
  • Submit Your Tested Solution to a TXL Oracle
  • Revise, Re-Test and Re-submit Your Solution Until the Oracle Is Satisfied

The Oracle will not allow you to move on to the next problem until you have demonstrated that you have learned the lessons of the previous problem. When you have successfully completed all four of the challenge problems, you have earned your license to program in TXL.

You can find the TXL Challenge here.