Architecture Software Using: A Methodology for Language Development

I m p l e m e n t a t i o n . The abstract machine is then given an implementation (typ- ically, a library), or possibly many, to account for different operational con- texts. The valuation function can be implemented as an interpreter based on an abstract machine implementation, or as a compiler to abstract machine instructions. P a r t i a l e v a l u a t i o n . While interpreting is more flexible, compiling is more effi- cient. To get the best of both worlds, we use a program transformation tech- nique, namely, partial evaluation, to automatically transform a DSL program into a compiled program, given only an interpreter. Each of the above methodology steps is further detailed in a separate section of this paper. 1.6 A W o r k i n g E x a m p l e To illustrate our approach, an example of DSL is used throughout the paper. We introduce a simple electronic mail processing application as a working example. Conceptually this application enables users to specify automatic treatments of incoming messages depending on their nature and contents: dispatching mes- sages to people or folders, filtering spam, offering a shell escape (e.g., to feed an electronic agenda), replying to messages when absent, etc. This example is inspired by a Unix program called s l o c a l which offers users a way of processing inbound mail. With s l o c a l , user-defined treatments are expressed in the form of rules. Each rule consists of a string to be searched in a message field (e.g., Subjec t , From) and an action to be performed if the string

[1]  Neil D. Jones Semantics-Directed Compiler Generation , 1980, Lecture Notes in Computer Science.

[2]  Olivier Danvy,et al.  Static and dynamic semantics processing , 1991, POPL '91.

[3]  Murali Sitaraman,et al.  Recasting algorithms to encourage reuse , 1994, IEEE Software.

[4]  Charles Consel,et al.  Partial evaluation for software engineering , 1998, CSUR.

[5]  David A. Schmidt,et al.  Denotationaisemantics: a methodology for language development , 1986 .

[6]  Flemming Nielson,et al.  Abstract interpretation: a semantics-based tool for program analysis , 1995, LICS 1995.

[7]  Conal Elliott Modeling Interactive 3D and Multimedia Animation with an Embedded Language , 1997, DSL.

[8]  Rubén Prieto-Díaz,et al.  Domain analysis: an introduction , 1990, SOEN.

[9]  David Lorge Parnas,et al.  On the Design and Development of Program Families , 2001, IEEE Transactions on Software Engineering.

[10]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[11]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[12]  Neil D. Jones,et al.  An introduction to partial evaluation , 1996, CSUR.

[13]  R. Mccain,et al.  Reusable software component construction - A product-oriented paradigm , 1985 .

[14]  James Milne Neighbors,et al.  Software construction using components , 1980 .

[15]  Guy L. Steele,et al.  Building interpreters by composing monads , 1994, POPL '94.

[16]  Samuel N. Kamin,et al.  A Special-Purpose Language for Picture-Drawing , 1997, DSL.

[17]  Charles Consel,et al.  Tempo: specializing systems applications and beyond , 1998, CSUR.

[18]  James R. Larus,et al.  Experience with a Language for Writing Coherence Protocols , 1997, DSL.

[19]  David M. Weiss,et al.  Engineering domains: executable commands as an example , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[20]  Olivier Danvy,et al.  Tutorial notes on partial evaluation , 1993, POPL '93.

[21]  Jacques Noyé,et al.  A Uniform Approach for Compile-Time and Run-Time Specialization , 1996, Dagstuhl Seminar on Partial Evaluation.

[22]  Elizabeth Bjarnason APPLAB — A Laboratory for Application Languages , 1996 .

[23]  Charles Consel,et al.  A Domain Specific Language for Video Device Drivers: From Design to Implementation , 1997, DSL.

[24]  Charles Consel,et al.  A framework for application generator design , 1997, SSR '97.

[25]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[26]  Neil D. Jones,et al.  Mix: A self-applicable partial evaluator for experiments in compiler generation , 1989, LISP Symb. Comput..

[27]  J. Christopher Ramming,et al.  Two Application languages in software production , 1994 .

[28]  Charles Consel,et al.  Mapping software architectures to efficient implementations via partial evaluation , 1997, Proceedings 12th IEEE International Conference Automated Software Engineering.

[29]  Alec Wolman,et al.  The structure and performance of interpreters , 1996, ASPLOS VII.

[30]  Charles Consel,et al.  Safe and efficient active network programming , 1998, Proceedings Seventeenth IEEE Symposium on Reliable Distributed Systems (Cat. No.98CB36281).

[31]  J. Craig Cleaveland,et al.  Building application generators , 1988, IEEE Software.

[32]  David M. Weiss,et al.  Auditdraw: generating audits the FAST way , 1997, Proceedings of ISRE '97: 3rd IEEE International Symposium on Requirements Engineering.

[33]  Tim Sheard,et al.  A software engineering experiment in software component generation , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[34]  Calton Pu,et al.  Microlanguages for Operating System Specialization , 1997 .