A Strafunski Application Letter

  • Ralf Lämmel
  • Joost Visser
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2562)


Strafunski is a Haskell-centred software bundle for implementing language processing components—most notably program analyses and transformations. Typical application areas include program optimisation, refactoring, software metrics, software re- and reverse engineering.

Strafunski started out as generic programming library complemented by generative tool support to address the concern of generic traversal over typed representations of parse trees in a scalable manner. Meanwhile, Strafunski also encompasses means of integrating external components such as parsers, pretty printers, and graph visualisation tools.

In a selection of case studies, we demonstrate that typed functional programming in Haskell, augmented with Strafunski ’s support for generic traversal and external components, is very appropriate for the development of practical language processors. In particular, we discuss using Haskell for Cobol reverse engineering, Java code metrics, and Haskell re-engineering.


Strafunski Program transformation Program analysis Language processing Generic traversal External components Interchange formats Functional programming 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    M. v. d. Brand et al. The ASF+SDF Meta-Environment: a Component-Based Language Development Environment. In R. Wilhelm, editor, Proc. of Compiler Construction 2001 (CC 2001), volume 2027 of LNCS, pages 365–370. Springer-Verlag, 2001.Google Scholar
  2. 2.
    M. v. d. Brand, H. d. Jong, P. Klint, and P. Olivier. Efficient Annotated Terms. Software- Practice & Experience, 30(3):259–291, Mar. 2000.CrossRefGoogle Scholar
  3. 3.
    R. Gray, V. Heuring, S. Levi, A. Sloane, and W. Waite. Eli: A Complete, Flexible Compiler Construction System. Communications of the ACM 35, pages 121–131, Feb. 1992.Google Scholar
  4. 4.
    J. Grosch and H. Emmelmann. A Tool Box for Compiler Construction. In D. Hammer, editor, Proc. of Compiler Compilers, Third InternationalWorkshop on Compiler Construction, volume 477 of Lecture Notes in Computer Science, pages 106–116, Schwerin, Germany, 22-26 Oct. 1990. Springer, 1991.Google Scholar
  5. 5.
    J. Heering, P. R. H. Hendriks, P. Klint, and J. Rekers. The syntax definition formalism SDF- Reference manual. SIGPLAN Notices, 24(11):43–75, 1989.CrossRefGoogle Scholar
  6. 6.
    M. d. Jonge, E. Visser, and J. Visser. XT: a bundle of program transformation tools. In M. v. d. Brand and D. Parigot, editors, Proc. LDTA 2001, volume 44 of ENTCS. Elsevier Science, 2001.Google Scholar
  7. 7.
    J. Kort, R. Lämmel, and C. Verhoef. The Grammar Deployment Kit-System Demonstration. In M. Brand and R. Lämmel, editors, Proc. of LDTA’02, volume 65 of ENTCS. Elsevier Science, 2002.Google Scholar
  8. 8.
    R. Lämmel. The Sketch of a Polymorphic Symphony. In B. Gramlich and S. Lucas, editors, Proc. of International Workshop on Reduction Strategies in Rewriting and Programming (WRS 2002), volume 70 of ENTCS. Elsevier Science, 2002. 21 pages.Google Scholar
  9. 9.
    R. Lämmel. Towards Generic Refactoring. In Proc. of Third ACM SIGPLAN Workshop on Rule-Based Programming RULE 2002, Pittsburgh, USA, 5 Oct. 2002.ACM Press. 14 pages.Google Scholar
  10. 10.
    R. Lämmel and C. Verhoef. VS COBOL II grammar Version 1.0.3, 1999. Available at: http://www.cs.vu.nl/grammars/vs-cobol-ii/.
  11. 11.
    R. Lämmel and J. Visser. Design Patterns for Functional Strategic Programming. In Proc. of Third ACM SIGPLANWorkshop on Rule-Based Programming RULE 2002, Pittsburgh, USA, 5 Oct. 2002. ACM Press. 14 pages.Google Scholar
  12. 12.
    R. Lämmel and J. Visser. Typed Combinators for Generic Traversal. In S. Krishnamurthi and C. Ramakrishnan, editors, Proc. of PADL 2002, Portland, OR, USA, volume 2257 of LNCS. Springer-Verlag, Jan. 2002.Google Scholar
  13. 13.
    V. Maslov and C. Dodd. Btyacc-backtracking yacc, 1995-2001. http://www.siber.org/btyacc/.
  14. 14.
    D. Parigot, C. Courbis, P. Degenne, A. Fau, C. Pasquier, J. Fillon, C. Held, and I. Attali. Aspect and XML-oriented Semantic Framework Generator: SmartTools. In M. v. d. Brand and R. Lämmel, editors, Proc. LDTA 2002, volume 65 of ENTCS. Elsevier Science, 2002.Google Scholar
  15. 15.
    J. Visser. Visitor Combination and Traversal Control. ACM SIGPLAN Notices, 36(11):270–282, Nov. 2001. OOPSLA 2001 Conference Proceedings: Object-Oriented Programming Systems, Languages, and Applications.Google Scholar
  16. 16.
    M. Wallace and C. Runciman. Haskell and XML: Generic combinators or type-based translation? ACM SIGPLAN Notices, 34(9):148–159, Sept. 1999. Proceedings of ICFP’99.Google Scholar
  17. 17.
    N. Winstanley. A type-sensitive preprocessor for Haskell. In Glasgow Workshop on Functional Programming, Ullapool, 1997.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Ralf Lämmel
    • 1
    • 2
  • Joost Visser
    • 1
    • 3
  1. 1.CWIAmsterdam
  2. 2.Vrije UniversiteitAmsterdam
  3. 3.Software Improvement GroupAmsterdam

Personalised recommendations