This invention relates to a pattern-based
programming system for automatic generation of high-level
programming language code. Many
code generation systems have been developed that are able to generate
source code by means of templates, which are defined by means of transformation languages such as
XSL, ASP, etc. But these templates cannot be easily combined because they map parameters and code snippets provided by the
programmer directly to the target
programming language. On the contrary, the patterns used in this programming
system generate a code model that can be used as input to other patterns, thereby providing an unlimited capability of composition. Since such a composition may be split across different files or code units, a high degree of separation of concerns can be achieved.A pattern itself can be created by using other patterns, thus making it easy to develop new patterns. It is also possible to implement an entire programming paradigm, methodology or framework by means of a pattern
library: design patterns, Design by Contract,
Aspect Oriented Programming, multi-dimensional separation of concerns,
data access layer,
user interface framework, class templates, etc. This way, developing a new programming paradigm does not require to extend an existing programming
system (
compiler, runtime support, etc.), thereby focusing on the paradigm concepts.This programming system introduces a higher abstraction level with respect to traditional programming languages: the basic elements of a program are no longer classes and methods but, for instance, design patterns and crosscutting concerns.