Arthur Van Dam

Program-Transformation.Org
  • Set SKIN = pattern


Thesis Computer Science

Arthur van Dam. Extending Dynamic Rules, An Application Oriented Study Into Stratego’s New Dynamic Rules. MSc Thesis INF/SCR-04-25. Center for Software Technology, Institute of Information and Computing Sciences, Utrecht University, February 2004. (pdf)

Abstract

The Stratego language for program transformation is based on a strategy-controlled application of basic rewrite rules. These rewrite rules have only local knowledge of the input term they are rewriting. Information gained elsewhere in the transformation of the input tree is unknown. Getting this context information available elsewhere in the transformation will make the rewrite system more specific for its current input, hence more powerful.

Dynamic rules are rewrite rules that can be generated at runtime. They may contain specific information aimed at the current input that has just become known. In Stratego 0.10 the dynamic rule system has been completely revised and now offers rule (re-/un-)defining, scoping, refined scoping by scope-labeling, forking followed by intersection or union in controlflow situations, and rule set extending when multiple rules should not redefine each other.

The dynamic rule concepts are introduced and illustrated in the context of three case studies: Shrinking inlining in a small lambda calculus, constant propagation in the imperative Tiger language, and deforestation in a first-order functional language.

The implementation and representation of dynamic rules is sketched, and their qualitative performance is investigated by several benchmarks.


Another LaTeX thesis documentclass: st-thesis

Some of the graduate students suggested to use a more-or-less uniform style for their theses. And hey, as a LaTeX fan, I immediately made an initial setup of a package `stratego` and a documentclass `stratego-thesis`.

Features

Some (optional) features of documentclass `stratego-thesis`:
  • B5 and A4 paper format
  • Sans-serif document font
  • Fancy headings
  • Several tiny layout tweaks

Usage

\documentclass[]{st-thesis}
Below are the available options (most are default). Defaults can be switched off by using:
\documentclass[sffont=false,12pt,color=false]{st-thesis}

  • parskip (default)
    Extra vertical space at start of paragraph. Zero Parindent (horizontal indent) and non-zero Parskip (vertical space).
  • *marginnotes*
    Account for marginnotes, make sure headers still look ok. Not thoroughly tested.
  • sffont (default)
    Use a sans-serif font as document default.
  • twoside (default)
    Generate double sided document.
  • b5paper (default)
    Use B5 paper format.
  • a4paper
    Use A4 paper format.
  • widepage (default) Make pagewidth somewhat bigger, comparable to package 'a4wide'.
  • fancyhdr (default)
    Use package 'fancyhdr', highly recommended.
  • hyperref (default)
    Use package hyperref, for fancy clickable links, pdf-toc, and all such good stuff.
  • openright (default)
    Make sure each chapter starts at a right page.
  • color (default)
    Sets some more eye-friendly colors for (hyper-)links and citations. Switch off for printing.
  • 10pt (default)
    Fontsize 10 as document default.
  • 11pt
    Fontsize 11 as document default.
  • 12pt
    Fontsize 12 as document default.
  • reportopt
    Allows to pass on additional options to underlying package report. Usage: \documentclass[...,reportop={fleqn,openbib},..]{st-thesis}

Additional commands

  • \frontmatter Light-weight variant of \frontmatter in the book documentclass. Just changes page numbering to roman (i, ii, ...).
  • \mainmatter Light-weight variant of \mainmatter in the book documentclass. Just changes page numbering to arabic (1, 2, ...).

  • \preface Makes a numberless chapter, titled 'Preface', with proper hyperlinking and TOC-entry.
  • \introduction Idem, now for 'Introduction'
  • \chapnonr{TOC-text}{chapter-text} Equivalent of \chapter*, but now with an unnumbered entry in table of contents, and proper hyperlinking.

Download

  • http://losser.st-lab.cs.uu.nl/~adam/tex/
    You need st-thesis.cls. Make sure it's in your writing directory, or in a path contained in $TEXINPUTS. Also download geometry.sty and place it in your writing directory. This is version 2.2 of geometry, for newer versions of package geometry, st-thesis produces other layout.

Questions or Feature requests

Mail to adam@cs.uu.nl

stratego in LaTeX

For stratego-related writing, here are some listings- and stratego-semantics-oriented commands, available in package `stratego`.

Features

Some features of package `stratego`:
  • highlighted Stratego code, and Tiger, ATerm, SDF2, and more.
  • Code fragments as floats

Usage

\usepackage{stratego}
  • No options needed.
  • Provided commands:
    • todo...

Download

  • http://losser.st-lab.cs.uu.nl/~adam/tex/
    You need stratego.sty and stratego-langdefs.tar.gz. Unpacking the latter yields an ldf/ directory with language definitions (for simple code-highlighting). Make sure stratego.sty and the directory ldf/ are in your working directory, or in a path contained in $TEXINPUTS.