My software language book is coming together. :-)
Software Languages: An Introduction
To appear in Springer Verlag, 2016-17
Call for book usage
If you are doing lectures or if you are otherwise interested in the emerging book, please get in touch. I can share draft material with you, subject to agreeing with some (simple?) copyright-related protocol. Of course, I would be happy to see this work being used and receiving feedback. If you would rather want to see a more polished manuscript, then get in touch anyway, and I am happy to keep you in the loop.
Use cases of the book
Let me just explain how I use the book; please let me know about your needs.
- I am readily using this book now as the exclusive resource for my Bachelor-level course on programming language theory, as it covers enough aspects of formal syntax, semantics, interpretation, and type systems. The style in these areas is quite applied as opposed to theoretical. Nevertheless some advanced topics are offered in the relevant chapters, e.g., metametamodels, partial evaluation, and abstract interpretation.
- I am also using this book to support my Master-level course on software language engineering. Especially the DSL primer and the broad coverage of the notion of software languages and the topics on software metalanguages and software language implementation help me to quickly drill into software language engineering. I should mention that, for the purposes of my research-oriented course, I don’t expect in-depth coverage of those subjects; rather I want to prepare students for research work.
Important characteristics of the book
I already mentioned that the book is written in an applied as opposed to a theoretical style. The book develops simple notations for abstract and concrete syntax which are used throughout the book. Different programming languages are used to implement functionality (semantics, type checking, transformation, translation, etc.). In the context of semantics and type systems, Haskell is preferred. In some illustrations of language implementation, Python and Java are leveraged. In a few places, Prolog is used for representing rewrite systems or deductive systems to provide executable specifications for problems of software language processing.
There are many exercises throughout the book; they are classified at the levels "basic", "intermediate", and "advanced". Solutions for the exercises are not included into the book, but they should be made available eventually online for the basic and intermediate levels.
Timeline for finalization
Realistically, I will need all of summer 2016 to finish and mature all content. In August, I plan to provide a version for reviewing by Springer. Depending on the details of the Springer-driven process and my ability to implement change requests in a timely manner, the book could be in print in 6 months from now (Mid June 2016). I would be very sad (as if you or me cared), if it would take another year. Until then, I am happy to communicate with regard to the possible deployment of the draft material in your courses.
Status of material
These chapters are stable:
- The notion of software language
- Software language examples
- Classification of software languages
- The lifecycle of software languages
- Software languages in software engineering
- Software languages in academia
- A DSL primer
- Language concepts
- Internal DSL style
- Textual syntax
- Parsing text to objects
- Language-agnostic models
- Language constraints
- Code generation
- Visual syntax
- Syntax of software languages
- Concrete syntax
- Abstract syntax
- The metametalevel
- Syntax mapping
- Semantics of software languages
- Pragmatic interpretation
- Big-step operational semantics
- Small-step operational semantics
- Denotational semantics
- The λ-calculus
- Partial evaluation
- Abstract interpretation
- Types and software languages
- Type systems
- Typed calculi
- Type-system implementation
The following chapters are not ready for your eye; they are released one-by-one to those interested:
- Preface (introduction to the book)
- Postface (summary and outlook)
- Software metalanguages
- Attribute grammars
- Rewrite systems
- Quasi quotation
- Intermediate representation
- Software language implementation
- Pretty printing
- Code generation
- Test-data generation
- Syntax-directed editing
- Megamodeling and software languages
- Entities of interest
- Relationships of interest
- Build management and testing
- Logic-based axiomatization
- Megamodels of coupled transformations
What’s not in the book?
- Description of specific platforms for software language implementation such as Eclipse, EMF, TXL, Stratego/XT, and Rascal. The book aims at being technology-agnostic and somewhat timeless. Also, the assumption is that there exists strong material for all important platforms. The book comes with online material though, which covers several platforms. Diverse platforms are mentioned in the right places in the book.
- Proper coverage of compiler construction topics such as flow analysis, intermediate or machine code-level optimization, and code generation. A cursory discussion of compiler construction topics is included though. There are clearly very good books on compiler construction on the market. Don’t expect this book to be useful for a compiler construction course.
- A deeper discussion of current research trends in software language engineering. One might thus miss non-trivial coverage of, for example, language workbenches, projectional editing, language embedding, debugging, language integration, and advanced metalanguages, e.g., for name binding or type systems. The reason for exclusion is again that the book aims at being somewhat timeless. Pointers to research works are included, though.