programs are synthesized by other
programs
Compositional Programming
— programs are assembled by composing
prefabricated parts
Domain-Specific Languages (DSL)
— domain-specific notations that simplify program
specification
Model Driven Design
(MDD) -- programs are specified as and synthesized from modelsAutomatic Programming
— efficient programs are synthesized from
declarative specifications
Program Analysis — tools that evaluate properties of
programs
The integration of the above areas seems
daunting. Yet a spectacular example of their integration was realized almost
thirty years ago: relational query optimization (RQO). A
relational query is specified in SQL, a parser maps it to an inefficient
relational algebra expression, a query optimizer optimizes the expression
automatically, and an efficient query evaluation program is generated from the
optimized expression. SQL is a prototypical declarative DSL. Query
evaluation programs are specified as compositions of relational algebra
operations; relational algebra is a prototype for compositional
programming. Automatic programming is achieved by query optimizers
that rewrite an inefficient expression/program to a semantically equivalent but
more efficient expression/program. The cost models that drive expression
optimization are examples of program analysis. Mapping a relational
algebra expression to an efficient program is generative
programming and is an elementary example of model driven
design.
A "holy grail" of Software Engineering is to
replicate the success of RQO in other domains. Feature Oriented
Programming (FOP) is a generalization, and its ideas are at the
confluence next-generation research topics in:
-
program design and synthesis: OO design,
product-lines, aspect-oriented programming, program refactoring, model driven
design, program evolution, and program transformations
-
mathematics: program algebras, tensors, and
category theory