Generic traversal over typed source code representations

Joost Visser · UvA-DARE (University of Amsterdam) · 2003

syntax definition and meta-tooling . . . . . . . . . . . . 32 2.3.1 Abstract syntax definition . . . . . . . . . . . . . . . . . 33 2.3.2 Abstract syntax tree representation . . . . . . . . . . . . . 33 2.3.3 Abstract from concrete syntax . . . . . . . . . . . . . . . 34 2.4 Generating library code . . . . . . . . . . . . . . . . . . . . . . . 35 2.4.1 Targeting C . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.4.2 Targeting Java . . . . . . . . . . . . . . . . . . . . . . . 36 2.4.3 Targeting Stratego . . . . . . . . . . . . . . . . . . . . . 36 2.4.4 Targeting Haskell . . . . . . . . . . . . . . . . . . . . . . 37 2.5 A comprehensive architecture . . . . . . . . . . . . . . . . . . . 37 2.5.1 Grammar version management . . . . . . . . . . . . . . . 38 2.5.2 Connecting components . . . . . . . . . . . . . . . . . . 39 2.6 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.7 Related work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.8 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 "main" --- 2002/12/19 --- 13:02 --- page viii --- #8 # # # # # # viii CONTENTS 3.2 Programming with folds . . . . . . . . . . . . . . . . . . . . . . 47 3.2.1 An example . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.2.2 Scalability problems . . . . . . . . . . . . . . . . . . . . 48 3.3 Programming with updatable fold algebras . . . . . . . . . . . . . 49 3.3.1 Updating algebras . . . . . . . . . . . . . . . . . . . . . 49 3.3.2 Type-preserving and type-unifying . . . . . . . . . . . . . 50 3.3.3 Crushing . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.4 Merging monads and updatable folds . . . . . . . . . . . . . . . . 52 3.4.1 Monadic folds . . . . . . . . . . . . . . . . . . . . . . . 52 3.4.2 ...

Read the paper · More papers on PaperTik