Using the Synthesizer-Generator to teach principles of programming language semantics

  • Authors:
  • B. L. Kurtz;J. B. Johnston

  • Affiliations:
  • Computer Science Department, Louisiana Tech. University, Box 10348 Ruston, LA;Computer Science Department, New Mexico State University, Las Cruces, NM

  • Venue:
  • SIGCSE '92 Proceedings of the twenty-third SIGCSE technical symposium on Computer science education
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Synthesizer-Generator (or simply Syn-Gen) is a software tool for building context sensitive editors. It has been applied to a wide variety of applications, ranging from programing language editors to editors that insure balanced chemical equations. The context sensitivity is provided by using attribute grammars. We provide an introduction to Syn-Gen and illustrate how it can be used to build programming language editors that only allow input of source code that compiles successfully. We then discuss use of Syn-Gen in two classes:- the study of attribute grammars in a graduate course on the formal specification of programming languages; in this course students completed a lab exercise dealing with the implementation of a context sensitive editor for a mini programming language.- the study of operational semantics in a junior level course; students used an editor implemented with Syn-Gen to study programming language translation and also completed an assignment to implement a very small piece of this editor dealing with the resolution of label numbers at the assembly language level.We found that assignments involving the details of Syn-Gen implementation were challenging due to the syntactic complexity of the Syn-Gen system. For such assignments to be successful, it was necessary to keep a tight rein on this complexity. Using Syn-Gen as a context sensitive editor without worrying about implementation was quite successful. In the future, we plan to explore the use of Syn-Gen to develop editors for mini-languages to help teach introductory students about the various programming paradigms: imperative, functional and logical.