Application programming as the construction of language interpreters

  • Authors:
  • R. A. Frost

  • Affiliations:
  • School of Computer Science, University of Windsor, Ontario N9B 3P4, Canada

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1989

Quantified Score

Hi-index 0.00

Visualization

Abstract

Application programming is often carried out in an ad hoc way compared to the construction of code for implementing operations in 'standard calculi' such as relational calculus, number theory, set theory, etc. The various programming techniques, such as 'abstraction' and 'transformation', which are often used in the latter are infrequently used in application programming. We believe that more structured approaches to application programming may facilitate the use of established programming techniques in application programming. In this paper, we explore one such approach that is based on the notion of 'application programming as the construction of language interpreters'. We have built a 'system' to support this approach. The system that we have built consists of a number of higher order functions that can be used to 'glue together' parts of a specification of an attribute grammar such that the result is an executable interpreter. These functions facilitate the 'language processing' part of application programming. Our implementation language is a higher order, lazy, pure functional programming language; this facilitates the 'standard calculi' part of application programming. We claim that for certain types of application programming, our system not only helps the programmer to separate these two aspects of the problem, but that it also provides a framework in which both aspects can be addressed methodically, taking advantage of various programming techniques such as 'abstraction' and 'transformation', and subsequently re-integrated to obtain the required program. We have extended the basic notion of attribute grammars so that our approach has wider application. The extension is based upon a new notion of 'multi-input parsing'.